Archive for the 'svn2rss' Category

Testing svn2rss

So my latest cool app is asking Subversion the latest changes over the repository.

It pretty much does this:

svn log #{your_url} --limit #{when_you_d_like_to_stop}

Then, for every revision, it runs a diff:

svn diff #{rev1}:#{rev2}

After playing around for some time with all those commands, my advice is to run svn2rss with Subversion 1.4, as my tests were taking more than 2 minutes to complete.

Subversion commits

I did some hacking this week-end, and the result is called svn2rss.

It’s a simple lib to parse a subversion log and create a RSS 2.0 feed out of it.

Quick snippet to show you how it works:

# the module to include in your script.
self.include Svn2rss

# parse the svn log
entries = parseSvnLog("http://myfeed.com/rss")
# create your own feed
feed = createRSSFeed(entries,
        "http://myfeed.com/rss",
        "My very own title",
        "My description of the feed",
        "en",
        "managingEditor@myfeed.com",
        "webmaster@myfeed.com")
# Well, as you can see the API is clearly not optimized.
# Still working on that particular point, so expect your API to break often till 1.0.

The implementation is coming with some complete examples:
-create a WEBrick server that will serve your feed.
-create a file to hold your changes and send it through FTP to a server.

You can check out a live instance of svn2rss here, and below is a snippet generated with Feed2JS.

0.1 is out, so installing it is just a matter of muttering the magic works:

sudo gem install svn2rss

I hope you like it. It cuts the deal for me. It certainly isn’t a replacement for some great tools like Fisheye, but it helps showcasing my works. More on that very soon.