1#!/bin/bash
2#/******************************************************************************
3# *
4# * Project:  OpenCPN
5# * Purpose:  helper shell script
6# * Author:   David Register
7# *
8# ***************************************************************************
9# *   Copyright (C) 2010 by David S. Register   *
10# *                                                                         *
11# *   This program is free software; you can redistribute it and/or modify  *
12# *   it under the terms of the GNU General Public License as published by  *
13# *   the Free Software Foundation; either version 2 of the License, or     *
14# *   (at your option) any later version.                                   *
15# *                                                                         *
16# *   This program is distributed in the hope that it will be useful,       *
17# *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
18# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
19# *   GNU General Public License for more details.                          *
20# *                                                                         *
21# *   You should have received a copy of the GNU General Public License     *
22# *   along with this program; if not, write to the                         *
23# *   Free Software Foundation, Inc.,                                       *
24# *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,  USA.         *
25# ***************************************************************************
26# */
27
28path=$(dirname $0)
29output=$1
30
31#convert to png
32for pic in $(ls $path/*prj.svg) $path/redX.svg
33do
34  echo "converting $pic"
35  inkscape --without-gui --export-png=$output/$(basename $pic .svg ).png --export-dpi=72 --export-background-opacity=0 --export-width=13 --export-height=13 $pic >/dev/null
36done
37
38for pic in $(ls $path/*viz.svg)
39do
40  echo "converting $pic"
41  inkscape --without-gui --export-png=$output/$(basename $pic .svg ).png --export-dpi=72 --export-background-opacity=0 --export-width=20 --export-height=13 $pic >/dev/null
42done
43
44