Automating the Publishing of Articles
If you're seeing this, it means my automation script worked perfectly.
There was too much manual work involved in publishing things to my website.
In order to publish a blog post, guide, or project to my site I had to:
- Write the RSS feed entry manually.
- Copy the RSS feed entry from the sitewide feed to the relevant other feed (blog-, project-, or guide-specific feeds).
- Manually add an entry under the What's New heading on the home page and delete the oldest entry.
- Manually add an entry under the relevant category page (i.e. /blog, /guides, or /projects).
- Manually compile and upload each of these pages.
Since all of that is relatively easy to automate, I went ahead and wrote a
script to do all of
that for me. All I have to do now is call
./publish <type> <file> and
everything listed above is done for me.
Not only does this get rid of a lot of potential for error in the process, it also makes it a lot easier for me to post things which will enable me to post more frequently without having to worry about all the work that came along with posting something new.
The script took me about 3-4 hours to brainstorm, write, realise that I was doing things inefficiently, look some stuff up on Stackoverflow, rewrite, realise that I wanted it to do more than just make RSS feeds (which is all I planned to automate at first), brainstorm some more, look some more stuff up on Stackoverflow, write some more, and then test and tweak.