Longtime users of Planet Xavier will undoubtedly have noticed that Xanga entries always appear out of order, always above LiveJournal entries. Longtime users of pX will also note that it’s not because I like Xanga over LiveJournal. No, it’s definitely not that.
Xanga, the wonderfully full-featured service that it is (okay, I’ll stop the sarcasm), does something absolutely bizzare with their feeds, something that I absolutely must rant about here. They simply put the dates in a
<title> tag instead of a
<pubDate> tag, and they encode the dates the American way instead of the standard way: according to ISO 8601, an international standard adopted almost twenty years ago!
Placing the date in the right element was a no-brainer – just a simple regular expression at the beginning of the feed-parsing script did the trick. But correcting the date: that was a real challenge. As I knew little about Python’s API and even less about the structure of the feedparser.py file, I spent the whole weekend trying to find out exactly how to parse the date and exactly where to place that code.
And when I finally managed to get it all right this morning, my host’s free servers go completely kaput. (They’re going through some growing pains; give them a break.) So I spend a whole day just waiting for things to come back online – which happens at bedtime, naturally. I’m typing this up despite my parents’ calls for me to get some sleep. Boy am I ready to code for a living…
I know there are still serious bugs with pX right now: the timestamps for many of the posts are up to two timezones off, for example. That’s actually due in part to the server. I’ll see what I can do…
Speaking of chronological order gone out of whack, I finally watched the two episodes of Doctor Who that Harrison forced upon me… around a month ago. You’d think I could spare an hour or two. (The second episode was really sobering, which is why me and my brother really liked it, Harrison. Thanks!)