26 lines
682 B
Bash
Executable File
26 lines
682 B
Bash
Executable File
#!/bin/bash
|
|
|
|
DEFAULT_DPI=300
|
|
LARGE='370' # Large container (370g)
|
|
SMALL='220' # Small container (220g)
|
|
|
|
SIZE=$LARGE
|
|
DLUO='décembre 2023'
|
|
LOT='0722-2'
|
|
TENEUR='50' # %
|
|
FRUIT='80' # g
|
|
STICKER='Gelée Extra - Cassis.svg'
|
|
DATADIR=/data
|
|
|
|
PDF="`basename \"${STICKER}\" .svg` - ${LOT} (${SIZE}g).pdf"
|
|
|
|
here=$(dirname $(readlink -f $0))
|
|
cd $DATADIR
|
|
|
|
$here/makesticker.py --landscape --dluo "$DLUO" --lot "$LOT" --teneur "$TENEUR" --fruit "$FRUIT" --quantite "$SIZE" -o out.svg "$STICKER" && \
|
|
$here/makeplanche.py -o pout.svg -t $here/planche.svg.in out.svg && \
|
|
rm out.svg && \
|
|
inkscape --export-type="png" --export-dpi=$DEFAULT_DPI pout.svg && \
|
|
rm pout.svg && \
|
|
convert pout.png "$PDF"
|