2019-06-04 14:18:22 +02:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
which inkscape
|
|
|
|
test $? -eq 0 || {
|
|
|
|
echo "missing inkscape"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
if=fileicons.svg
|
|
|
|
#~ iconsize=16 # in px
|
|
|
|
for iconsize in $(echo 64 ); do # in px, assuming its a square, a = iconsize; smaller than 64 is unreadable
|
2019-06-21 13:37:19 +02:00
|
|
|
for ofi in $(echo epub html pdf other); do
|
2019-06-04 14:18:22 +02:00
|
|
|
|
|
|
|
# output filename
|
|
|
|
of="new-"${ofi}"-"${iconsize}".png"
|
|
|
|
# needs group obkect to be renamed accordingly and layer visible
|
|
|
|
# option `--verb=LayerShowAll` works with GUI only, possibility: split SVG in separate files beforhand
|
|
|
|
inkscape --without-gui --file=${if} \
|
|
|
|
--export-id-only --export-id=${ofi}"-prod" \
|
2019-06-21 22:32:46 +02:00
|
|
|
--export-background-opacity=0 --export-area-page \
|
2019-06-04 14:18:22 +02:00
|
|
|
--export-png=${of} --export-width=${iconsize} --export-height=${iconsize}
|
|
|
|
|
|
|
|
done
|
|
|
|
done
|