date: 2016-03-28 title: Implementing Microblogging in Pelican Since implementing TinyTinyRss[1], although, to be fair, really long before that, I've found myself enjoying the experience of reading RSS feeds far more than I have ever enjoyed twitter. I prefer the pause which reading an rss feed gives to the formation of an opinion. Instead of the quick-fire "must react _now_" nature of interacting with my twitter feed, I find myself reading the articles, processing the information, and coming to an opinion on matters in a much more reasoned and, to me, sensible manner. I've had some changes in my own life recently which have meant that I'm no longer willing to have my days torn apart by the latest twitter-storm, be that the latest ignorant emissions from Donald Drumpf or Richard Dawkins, or just this week's Kony-video[2]. Incidentally, that blog of mine linked to there is from four years ago. I've simply lost count of the number of ignorant kony-like twitter storms which have passed since then. Just two of those twitter-storms, naturally enough, are Gamergate and the Sad/Rabid Poopies. I've learned more, and experienced more, from reading people's long thoughts about those issues that I ever have from just reacting to the latest 140-character shitfest emanating from those controversies. Incidentally, this is not a 'Twitter Quitter Post'[^1], as I think twitter will always have a place in this modern connected world. Yesterday, for example, I sent a tweet to author Catherynne Valente letting her know I'd seen her book Radiance [3] shelved in the non-fiction section in a local bookshop. She retweeted it, it got some fave's, and the interaction was enjoyable. I don't presume for one second that I'd have had that same reaction had I microblogged about it here on my site. Nevertheless, and hearkening to my long-standing **Own Your Content** theme, I think that just as there is a place for twitter, so too there is a place for microblogging outside that or indeed any other service. If you have spent time and effort to create an online presence which you value and which you control, it seems natural that you should place your own 'intermittent thoughts' within that presence. As can be read on the bottom of every page of this blog, this site is created using the pelican framework [4], a static-site blogging engine. I write my posts on a variety of devices using text editors, each post is formatted in Markdown, it is then uploaded, by diverse means, to a specific site-only dropbox[^2], where a couple of cronjob scripts repack each one into the expected format, finally rebuilding the site every time there is a new post. This has worked beautifully now since 2012, thanks to the inherent customisability of the framework. I was confident that this would work to my favour in adapting to a microblogging purpose, and so it proved. I looked around to see how people were presenting microblogs in the context of a more traditional blog, eventually finding Manton Reece's Definition of Microblogging [5] from 2014. I liked the idea of presenting microblogs in the standard flow of the site, just absent heading/title information and without the markers usually associated with a blog-post _qua_ blog-post. I decided to create a new category of post called `micro`, as this allows me to have a separate rss feed of microblog posts, a key stage of this endeavour. This meant I now had to make minor adjustments to my templates to make the microposts appear differently, without headers and with different metadata. This was accomplished by inserting an `if-else` loop in both `index.html` and `article.html`. {% if article.micro %} {{ article.content }}
{% include "micrometa.html" %}
{% else %} ...rest of template That then prepares the text from a micropost as unadorned text on the page, no header, no tags are displayed, just the content and some timestamp information. As you can see, that timestamp calls for an additional new template, this time called `micrometa.html`, which is just a straight pull from `strftime` in the following format {{ article.date.strftime("%a %-d/%b/%Y%H:%M") }} That also allows me to set up a slug for the microposts, based on epoch-elapsed time, which would allow me to have numerous microposts in the one day. The system I used previously was kind of predicated on the infrequency of my posting here, something which isn't a valid presumption for microblogging. After a little teething problems, primarily caused by my overuse of the jinja code `endif`, I got it running for the expense of about two hours, including research. Job's a good 'un. I wanted to make the process as painless as possible, so I created a workflow in the workflow app, adapted from the workflow I use to make textshots for twitter [6]. You can see the first two microblogs below this post _______References_________________________________________________ [1] https://ascraeus.org/tiny-tiny-rss-with-unread/ [2] https://ascraeus.org/commodifying-terror/ [3] https://ascraeus.org/radiance---a-novel/ [4] http://pelican.readthedocs.org/en/latest/ [5] http://www.manton.org/2014/09/defining-a-microblog-post.html [6] https://ascraeus.org/pages/textshotter/ _______Feetneet___________________________________________________ [^1]: After all, I've already done one of those, back in 2013!