Niall’s virtual diary archives – Tuesday 31st December 2013

by . Last updated .

Tuesday 31st December 2013: 9.30am. With a bit of luck this second and last possible virtual diary entry for 2013 (yes, just two entries this year, worst ever) will shortly appear after another large revamp of nedprod's internals - as you may or may not notice, the content from my Google+ posts now also appears here as if they were virtual diary posts, which means that the almost entirely static HTML content which is is finally no longer static, and this XHTML you are reading now is now entirely dynamically generated using a lot of custom written PHP. Basically, internally nedprod still is all static HTML, but the Atom XML feed has for a long time synthesised all the posts by parsing all the XHTML files making up the virtual diary posts into Atom XML, so all I've done is the "close the loop" as it were and have the site's virtual diary entries be generated from the Atom XML feed instead. So, for me to do a new post, I add some static HTML to the end of a file like I'm doing now and on next upload the Atom XML PHP script will convert that to an updated feed, which in turn is parsed and displayed as if it were static HTML on the site. Obviously such a system has huge maintenance benefits for me in that I no longer need to copy and paste around bits of HTML when I retire old entries to the archives, plus it's trivial to mux in the Google+ post content.

In case you're wondering, the Google+ post content is also static HTML. I wrote a bit of Python which uses the Google+ API to synthesise a static HTML file as if I had written the Google+ posts as virtual diary entries. As nedprod actually lives inside a git repo which is mirrored onto my ZFS store and source code change controlled, that means all my Google+ posts become a permanent, cannot be lost part of, something which I have been meaning to do for a long time now seeing as I barely make any entries directly onto nedprod any more (like this being the second of 2013).

So, I guess I'm finally "catching up" with modernity eh? nedprod is now a PHP and XML database driven website! Who would have thought it only a few years ago! Be happy!

Go back to the archive index Go back to the latest entries

Contact the webmaster: Niall Douglas @ webmaster2<at symbol> (Last updated: 2013-12-31 09:30:00 +0000 UTC)