Casualty 14-18 ~ The making of a generative artwork by Richard Bolam – Part 9 #bolamat50 #casualty1418 #WW1

Screen shot 2014-08-10 at 18.49.00

In the parlance of modern coders:

BOOM!

I have implemented the batch creation of images and the automated posting of multiple, scheduled blog posts. It’s spam technology, basically, and I am rather pleased with myself.

I hasten to add that the code, although reliable, is quite klunky so far, with no error-checking, no error-correction, no subroutines or functions and no audit-logging. The software echoes some info to the console for me to keep an eye on it, but am still checking each blog individually post for errors.

However, it’s only a development version of the software, but it works! The important part of this is that what I have done so far is a successful proof of concept of the workflow; creating the images, batch emailing them and automatically scheduling the posts over consecutive days. I am just doing batches of three days initially, but when I have checked the software more I will extend the period as there is no way I can attend this project every day for more than four years.

http://casualty1418.net

As I have said before, I am not an expert programmer, but I have done a lot of programming over the years, all the way back to 1980. However, I must say Bash is very odd, although it can do, well pretty much anything although some achievements with it require an almost religious devotion and a huge leap of faith. It’s not for the faint-hearted or the easily diverted.

Fortunately my heart is not faint and I am rediscovering something of the evangelical excitement I remember from those early days of programming.

Anyway, I think I might also start printing these out on actual paper. I had not intended to print this version of the work at all, but it might make a interesting adjunct to the online version.

Code fragment:

#!/bin/bash
#casualty make script v14

for d in {1..3}
do
CURRENTDATE=$(date -v+$d’d’ +”%y_%m_%d”)
CURRENTLABELDATE=$(date -v+$d’d’ +”%d/%m/%y”)
SCHEDULEDATE=$(date -v+$d’d’ +”%Y-%m-%d”)
echo $CURRENTDATE
echo $SCHEDULEDATE

mkdir ‘Casualty1418-‘$CURRENTDATE
PATHNAME=’Casualty1418-‘$CURRENTDATE’/’
echo $PATHNAME

#image creation code here…

#email images to blog
cd $PATHNAME
FILENAMES=*.png
FILENAMES2=’-a ‘`echo $FILENAMES | sed ‘s/ / -a /g’`
echo $FILENAMES2

echo ‘[delay ‘$SCHEDULEDATE’ 07:00:00 GMT][tags #casualty1418,#bolamat50,#WW1,Casualty,Casualty 14-18,#firstworldwar,First World War,generative,algorithmic,computational,art,Richard Bolam,Bolam Retrospective,#bolamat50][nogallery]’ | mutt $FILENAMES2 -s ‘Casualty 14-18 ~ ‘$CURRENTLABELDATE’ #WW1 #casualty1418′ youruniqueemailaddress@post.wordpress.com
cd ..

done

The next stage of development might include rewriting the code to be a bit cleaner and structured. It would be better to attend to that now, rather than later when there is a lot more sauce on the spaghetti.

Stay tuned…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s