DailyRiczWest – behind the scenes v0.4

Newspaper MegaphoneDue to extraordinary circumstances (i.e. the hottest day this year) I didn’t quite get as far as I wanted with this release, but I did generate it from the command line in UNIX. I have 2 files under templates:

  • header.html
  • footer.html

and generated this file with the UNIX commands

  • sed -e 's/\*BR\*/\<br\>/g'
    ../../../../ifttt/favourites.txt > body.html

– this is the “Stream EDitor” which can perform various editing tricks from the command line. In this case, it’s doing a global search and replace for the string “*BR*” and replacing it with “<br>” to get the breaks in the HTML for reasonable formatting

  • cat ../../templates/header.html body.html
    ../../templates/footer.html > daily-18.html

– which basically ConcATenates the header, body and footer files in to one file

  • rm body.html

– that deletes the intermediate file

so there was no real manual editing, and I could obviously put this in a shell script with the above 3 commands.

Leave a Reply

Please log in using one of these methods to post your comment:

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 )

Connecting to %s