Minh’s Notes

Human-readable chicken scratch

Minh Nguyễn
June 19th, 2005
Planet Xavier
#789

Edit

Chronology

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…

So the Xangas are now where they belong, which means I can now focus on my next pX task: implement a more efficient way to collapse excessively long or inappropriate entries.

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!)


TrackBacks

  1. Xanga finally fixed their RSS feeds to include the dates of each post properly. I would say that with no trivial amount of jubilation, except that their fix broke my fix.


Comments

  1. If you want I'll try to put the rest of the episodes on CD's and give them to you Monday. That is if I'll be able to pick up a new stack of CDs from Office Depot. I am running out seeing as I made a copy of the season for James, Chris, Aria, and myself. Ohh and everyone that has seen the series so far really likes it; look at Drew's recent post about it.