Mac GeekeryGet your geek on. |
|
blog advertising is good for you
recent popular content
User login
|
With the advent of RSS readers that can use so-called “local feeds” for various reasons, it was inevitable that some code monkey would convert his 250K system.log file to RSS. Hello. Perl is my language of choice here. I’m sure you have your own opinion of what language to use for tasks like this, and you can stuff it. I chose Perl. The goal is very simple. We need to take a line, pretty it up into pieces, and then make an RSS Attached is said file. Read over it, run it, have fun. I’m not here to teach you how to write Perl. What I am going to do is show you how to have fun with it. Given the attached script, run it once and redirect the output to a file:
Now load the file in your reader. This will vary per reader. Here, I use Pulp Fiction 1.2 because it’s drop-dead simple to add a static RSS file to it. Others require you to re-run the script or serve it locally in your Sites folder (also a possibility for older/other readers that do not support local feeds). To add it to PF 1.2 … drag it into your Subscriptions window. You’re done. So now that you have a feed going, you want to update it. Well, we’re obviously going to use For a
About Adam Knight
Author Biography Adam Knight is one of the founders of Mac Geekery and is a geek at heart. Programmer by day, hacker by night, his daily life revolves around the Macintosh platform, which he has been a user and programmer for since the early days of System 7 when his LCII replaced his Apple //c. In-between tech jobs, he’s managed to learn the basics of any web hacker: PHP, MySQL, Perl, Apache, Linux, *BSD, and the intricacies of ./configure —prefix=~/bombshelter/. Today, codepoet is concentrating on blogging again, writing some software for the Mac by himself (including Notae) and for his company (such as Switchblade) and has a few other toys coming out soon. Bug him over AIM or email [link fixed]. |
Create RSS feeds from system log files
Tags: keerazy, ...
What does a bored geek do? Put his system logs in RSS, of course.
It works pretty well now that I got a good GUID scheme down and parsed out th