script for automatic PNG export
This commit is contained in:
parent
2c4b5b4bbb
commit
8549186c41
2 changed files with 19 additions and 0 deletions
2
README
2
README
|
|
@ -1 +1,3 @@
|
|||
Set of Hanafuda cards in the form of 12 pictures in the SVG format.
|
||||
|
||||
Run export.sh to export the large pictures and the cards in PNG files.
|
||||
|
|
|
|||
17
export.sh
Executable file
17
export.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
# for each svg file
|
||||
for svg in `find . -name *.svg` ; do
|
||||
|
||||
# the complete filename without the extension
|
||||
base=`echo $svg | sed s/.svg//`
|
||||
|
||||
# export each 4 cards
|
||||
for i in `seq 4` ; do
|
||||
inkscape --export-png=${base}_card_$i.png --without-gui --export-id=card_$i --export-height=800 $svg
|
||||
done
|
||||
|
||||
# export the whole page
|
||||
inkscape --export-png=$base.png --export-area-page --export-width=1024 --without-gui $svg
|
||||
done
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue