the further adventures of

Mike Pirnat

a leaf on the wind

« Previous Page

January Link-o-Rama

Now that I've gotten caught up on my huge backlog of email, it's time to close some tabs and share some links, because it's more fun than doing anything productive. Submitted for your approval:

Chunk Norris Facts will teach you all sorts of interesting things about Chuck Norris; for example, "the chief export of Chuck Norris is pain." Not to be missed.

Learn all about sushi with the Sushi Eating HOWTO. (Kind of self-explanatory.)

Can't get enough "Firefly?" I certainly can't. Check out Escape Key's "Mal's Song", an expanded version of the "Firefly" theme. It's a bit filkier than my tastes usually run, but I've gotten it stuck in my head anyway. Plus, if you didn't fill your belly with sushi (see above), you probably have room for a tasty Fruity Oaty Bar!

When you're done watching the Fruity Oaty Bar video (and putting the MP3 on a loop for a few hours; don't be embarrassed, it's perfectly normal), some of you might be amused by IBM's Linux cartoons. While I was entertained, my inner shareholder wonders how much they paid for those.

Transformer di Roboter present "Stranger in Moscow", a musical gem that uses the Macintosh startup chord as its bassline. No, seriously!

Retrievr lets you search Flickr by sketching. It's wickedly mind-blowing!

I hooked up my new keyboard (a Christmas present) today to see how effective I'd be at typing without any labels on any of the keys. It turns out, with the exception of well-formed (aka tricky) passwords, I'm quite good with it. I also really like how different regions of the keyboard have different resistance to touch, so your hands get a good feel for what keys are what as they are being struck. The only thing that kind of pisses me off is that the Scroll Lock and Caps Lock lights don't seem to light at all (the Caps Lock would probably be helpful, don't you think?), and the Num Lock light seems to be flaking out--typing causes this LED to flash and sometimes go completely dark. I guess I wouldn't particularly miss these if they went away, but they are kind of annoying and really detract from the overall quality of the keyboard. Alas, I think my search for a new "perfect keyboard" must press any key to continue... (Time to find someone who makes a USB equivalent of the old Apple Saratoga keyboard.)

Finally, Minifesto is a cute tool for making animated icons out of your favorite snippet of text, suitable for generating excellent customized LiveJournal icons.

Read and Post Comments

Reinventing Someone's Wheel

I set aside the time tonight to get down and funky with the feedparser.py bug about it discarding unknown elements. I poked, prodded, sliced, diced, got my hands dirty, figured out what the problem was, and fixed it--huzzah! I had just gotten done submitting my patch back to feedparser's Sourceforge site, when I saw that someone else had already filed a nearly identical patch at the beginning of September. (It's amusing exactly how similar it is--great minds think alike, I guess?) On one hand, I wish I had seen Adam's patch right away and not had to fight with it myself, but on the other hand it was a Valuable Learning Experience, the kind of thing that Builds Character. Plus given how long some of the patches have been sitting around without anyone looking at them, I think it'll be at least six months before I actually manage to accrue any public embarrassment for my duplicate solution to the problem... I just hope one of the patches gets rolled into the next release, because it looks like while this is a cool project, it is desperately in need of some cleanup and love.

The practical upshot of this is that my patched feedparser.py is no longer discarding the "mood" and "music" information from LJ feeds, so I am now feeding pirnat.com with the same level of syndicated goodness that it had before I switched over to feedparser from my home-brew RSS parser.

Additionally, I was able to get the "filtered feeds" working and automatically publishing to the website as well. I need to clean up the site a bit and link to them somewhere, but that's luckily the easy part. For a sample of what I mean, check out:

Now, maybe one of these days, I'll have something worthwhile to say! ;-)

Read and Post Comments

Python/RSS Fun Continues

My first dabbling with feedparser and PyRSS2Gen went so well that I've finally worked up the gumption to rewrite the code that pulls my RSS feed from LiveJournal, renders it to static HTML, and publishes it to where pirnat.com is hosted. Minus one annoying bug in feedparser (it discards unknown elements, so right now my LJ-specific data like "mood" and "music" isn't making it through), it's going pretty smoothly so far. I just switched my crontab over to using the new setup, so that means I am happy enough with it to use it.

Liz has to do the wine sales thing tomorrow, so I hope to get some more accomplished. At the very least I want to hook the feed filtering into the little cron script so that I can start producing topic-specific RSS feeds. Once that works, I will of course have to shake my website update wand and actually link to the things (in case anyone out there ever gives a crap). If all that gets done, then it's time to dig into the feedparser bug and see if I can figure out how to make it behave a little better with unknown elements.

Whee!

Read and Post Comments

Fun With RSS and Python

I should have looked into this stuff a while ago, because it's entirely too handy and, in a word, pythonic. I will probably rewrite my crufty home-brew LiveJournal RSS parser using Mark Pilgrim's excellent Universal Feed Parser. Additionally, since I'm not sure if Planet allows easy filtering based on category, and I might like my occasional TurboGears rambling to show up there, I think I will combine feedparser with PyRSS2Gen to build a simple little program to pull, filter, and re-emit RSS feeds.

Of course, knowing my luck, something like that already exists, but at least it'll be fun. ;-)

Basically, it would be something like this:

import feedparser
import datetime
import PyRSS2Gen

# get the data
d = feedparser.parse('http://exilejedi.livejournal.com/data/rss/')

# do the filtering & build a list of RSSItem objects
items = [PyRSS2Gen.RSSItem(
    title = x.title,
    link = x.link,
    description = x.summary,
    guid = x.link,
    pubDate = datetime.datetime(
        x.modified_parsed[0],
        x.modified_parsed[1],
        x.modified_parsed[2],
        x.modified_parsed[3],
        x.modified_parsed[4],
        x.modified_parsed[5]))
    for x in d.entries if some_criteria(x)]

# make the RSS2 object
rss = PyRSS2Gen.RSS2(
    title = d.feed.title,
    link = d.feed.link,
    description = "ExileJedi's Filtered RSS Feed",
    lastBuildDate = datetime.datetime.now(),
    items = items)

#emit the feed
xml = rss.to_xml() # or perhaps do rss.write_xml(some_file)
Read and Post Comments

Iconage: Nausicaa + Serenity

I have occasionally been bored enough or in need of something completely different from my normal mode of being focused on code and servers and misbehaving software. When it gets really bad, I end up staying up too late playing with Photoshop.

A couple months back, I did a few Nausicaa icons; last night I was overcome with the compulsion to do some Firefly/Serenity icons. For those who haven't seen Serenity yet, do note that some of them may be borderline spoilers.

Nausicaa

Serenity

Typical LJ netiquette applies--please credit me in your userpic keywords or comments if you snag any. Enjoy.

Read and Post Comments

« Previous Page