mirror of
https://github.com/luzifer-docker/phantom-firemap.git
synced 2024-12-20 12:51:18 +00:00
parameterize naming, improve PDF generation
This commit is contained in:
parent
706651c178
commit
429744aedf
1 changed files with 3 additions and 6 deletions
9
run.sh
9
run.sh
|
@ -4,15 +4,12 @@ DPI=150
|
|||
W=1754 # 150 x 11.69
|
||||
H=1241 # 150 x 8.27
|
||||
|
||||
/usr/bin/phantomjs /src/index.js "$@"
|
||||
/usr/bin/phantomjs /src/index.js $1 $2 $3
|
||||
|
||||
TARGET="map_$(date +%Y-%m-%d_%H-%M)"
|
||||
TARGET="$4_$(date +%Y-%m-%d_%H-%M)"
|
||||
mv /data/shot.png /data/${TARGET}.png
|
||||
|
||||
#exec convert /data/${TARGET}.png -compress jpeg -quality 90 \
|
||||
# -resize ${W}x${H} -density ${DPI} \
|
||||
# -repage ${W}x${H} /data/${TARGET}.pdf
|
||||
exec convert /data/${TARGET}.png -compress jpeg -quality 90 \
|
||||
-resize ${W}x${H} -gravity center -extent ${W}x${H} \
|
||||
-units PixelsPerInch -set density ${DPI} \
|
||||
-units PixelsPerInch -density ${DPI} \
|
||||
-repage ${W}x${H} /data/${TARGET}.pdf
|
||||
|
|
Loading…
Reference in a new issue