Seymour

Another feed reader library for PHP

Welcome!

November 6th, 2005

Hi, and welcome to the homepage of Seymour - of all the feed reading libraries available for PHP, this is the latest.

You might have noticed that there are no files or details available as yet. Never fear, Seymour does actually exist and is working. But as I’m increasingly realising, there’s a lot of stuff to do to get a FOSS project released!

So bear with me, and you can expect to see some usable files online in the next couple of days. At which point, prepare to be blown away with amazement … or at least gently nudged by mild appreciation.

Release 1.0a!

November 7th, 2005

The first release of Seymour (1.0a) is now available on the files page at Sourceforge.

This is an alpha release, so don’t use it in production environments. But it’d be great if as many people as possible started trying it out so it can get some real world experience and we can get on the way to a beta version!

All documentation is currently included in the download, but expect to see more info on this site very soon.

Meet Audrey 3

November 8th, 2005

Say hello to our new mascot, Audrey 3*, you can see her up there in the title bar. But beware, she likes the taste of BLOOD!!!

Yes, I’m going a bit strange, I blame CVS.

* Copyright violation? What copyright violation?

2000 unit tests!

November 9th, 2005

OK so I was scoping the competition, I still think Seymour is the bomb in the PHP world, but I did find this for Python: FeedParser

I’m getting a lot of ideas for how Seymour can be improved. But the best part is they have over 2000 unit tests. I’m not not sure what the copyright/licensing issues are, but if possible I hope to include these unit tests in the next revision of the code (and presumably, fixes for all the bugs that emerge).

Stay tuned…

Unit tests - ouch!

December 10th, 2005

I’m still in the process of getting Seymour to pass all these 2000 unit tests. I was going pretty well, I had it down to about 40 fails which were all to do with encoding that the PHP xml module didn’t support, but then I upgraded to a newer version of PHP 4 and now there’s some new problems.

I’m still working through those ones. It may take a while, but once complete Seymour is gonna be very robust, so I think it’s worth it.

PS. If any hardcore PHP gurus can tell me why the xml_parse() function from PHP would flip out when the CDATA is over 301 chars, but be fine with only 300, then let me know in the comments!

UPDATE: Turns out that the xml_parse() function was not actually the culprit. It was the preg_match() function. Apparentely it has some known issues with certain types of patterns in some versions of PHP. Anyhow, I’ve simply changed the pattern to avoid the problem. The latest copy in CVS reflects these changes.

More improvements

January 22nd, 2006

It’s been a couple of months since I posted. But action is still going on behind the scenes. Seymour is actually just one element of a bigger project I’m currently working on.

It has now been running on my test server aggregating a few hundred blogs for about 2 months now. With no real problems.

I’ve also made some minor improvements based on feedback. All the getBlah() functions should now return sensible defaults if the feed hasn’t explicitely included that element, which makes your code a little cleaner.

For example a call to fetch the categories of an entry like this…

foreach($entry->getCategories() as $cat) {
// do something with the category
}

…will now return an empty array rather than null, so you no longer have to test for the existence of everything before trying to use it. Similarly, calls that you’d expect to return strings will now just return empty strings if the element doesn’t exist in the feed.

And even calls which return objects will now return a blank version of the object. This helps make your code much simpler. For example if you wanted to get the email address of the author of a feed, you would previously have had to test that the feed had included the author’s details first:

$author = $feed->getMainAuthor();
if ($author) {
$email = $author->getEmail();
}

Now you can simply do this…

$author = $feed->getMainAuthor();
$email = $author->getEmail();

…and if no author details have been included in the feed, $email is just an empty string. Before you would have got a ‘access member function of a non-object’ error.

These improvements are in the latest CVS version on Sourceforge.

Talking to myself…

January 22nd, 2006

I released Seymour a couple of months ago now. It hasn’t changed the world yet, but I notice that a few people have downloaded it.

It would be great if any of those people who have could give me some feedback on their experience with it. That was the idea of releasing it as FOSS software really. I’m using it myself in another project, but I’d like it to become as useful and stable as possible, and I figure the best way to do that is to get a bunch of other people using it in different environments and on different feeds, and maybe one day contributing some improvements back. There’s certainly a lot of RSS-modules and obscure feed formats that I haven’t even touched yet.

So yeah, help me get the whole community project thing happening and maybe one day Seymour can be a serious contender with the likes of Magpie…

Now detects permanent errors

March 22nd, 2006

I just committed a change into the CVS tree that adds a property to the feed reader that tells you whether an error is transient or permanent. It’s useful to distinguish between say, a connection timeout which could simply mean the server is overloaded or crashed, vs a 404 which means that you’ll never find what you’re looking for there.