fix parameters for new version

This commit is contained in:
vv01f 2022-07-19 11:12:47 +02:00
parent 514f6437e6
commit 54386650d8
1 changed files with 16 additions and 9 deletions

View File

@ -1,22 +1,29 @@
#!/usr/bin/env sh
which inkscape
test $? -eq 0 || {
command -v inkscape || {
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
for ofi in $(echo epub html pdf other); do
for ofi in $(echo epub html pdf magnet other); do
# output filename
of="new-"${ofi}"-"${iconsize}".png"
filetype="png"
of="new-"${ofi}"-"${iconsize}"."${filetype}
# 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" \
--export-background-opacity=0 --export-area-page \
--export-png=${of} --export-width=${iconsize} --export-height=${iconsize}
#~ --export-id-only --export-id=${ofi}"-prod"
inkscape ${if} \
--export-area-page \
--export-type=${filetype} \
--export-filename=${of} \
--export-id-only \
--export-id ${ofi}-"prod" \
--export-background-opacity=0 \
--export-width=${iconsize} \
--export-height=${iconsize} \
--batch-process
done
done