Here is the first attempt at a Bash script to create the Casualty 14-18 graphics. This script takes the basic figure graphic “casualty.png”, creates an array of them and pads it out to an A4-sized page. The image above is the result.
At this stage, there is no variation added to the figures.
#casualty make script v1
convert casualty.png -gravity center -extent 20×38 casualtypad.png
#create tiled image of figures
convert -size 400×646 xc:white -composite tile:casualtypad.png casualtytiled.png
convert casualtytiled.png -bordercolor white -border 99×90 casualtypage.png
#create page dimensions
convert casualtypage.png -gravity north -extent 598×850 casualtypage.png
convert -background white -font Helvetica -pointsize 10 -size 598×20 -gravity center label:’Casualty 28/07/14′ casualtylabel.png
#composite page & label
convert casualtypage.png -page +0+750 casualtylabel.png -layers flatten casualtyfinal.png
And here is the result:
I started out by using discrete command-line operations and then sequenced them into a script. I found basic instructions to create an executable script here:
I have made Bash scripts before, but am certainly no expert at it. However, it’s quite easy once you overcome the counter-intuitive syntax of many Linux commands.
The next stage is to introduce variations to the figures and produce multiple sheets for each day with labels and date-sequenced filenames.