Funnel 0.1

I worked some more on Funnel over the week-end to turn it into something usable. You can get it here.

The results look (In My Not So Humble Opinion) very good:

  • Funnel supports caching. It will register the feed if you ask it to, and will ping it back in case you update something. The data is stored in the database, maybe we can expose it if needed.
  • Funnel updates asynchronously. You run a script to update the feed data, and another one to generate the feed file
  • I made a nice website, that should be updated with more and more examples and documentation.

I still miss for now the background job that will trigger the update and generation scripts. It may be done using cron, which is fine for Unix-land.
I will probably add a rake task to force an update, and a script to run an update thread in background.

The admin interface is yet to be done. Once it is, I’ll shoot for 1.0. Stay tuned!

Push your feeds into Funnel

I have continued my experiment with the RSS libs a bit, and have built a first prototype that I call Funnel.

Funnel takes the feeds declared in the feeds table.

In a separate thread, it runs a script that looks at the feed, and if there is a new item or an item that looks like it is updated, it runs a filter on it.

The filter is completely extensible, so that I can add antispam measures later like I did here.

Once the item is accepted, it is picked up by the feed when building it using Builder.

I fund this project with Micropledge. Micropledge is a really cool website to get your open source projects funded. Check it out!

At this point, I achieved my primary goal but have new issues I need to deal with.

  • I want to record the feed optionally. I want to make it possible for the user to record completely the items in the items table, so that he does not have to bother about them.
  • I use Rails. While this gives a nice frame to my application, it is clearly overkill for some uses of Funnel. I think I should make it available in different little gems, and the core gem would provide pretty much as simple as Svn2Rss is.
  • The feed is not cached. It is currently recreated every time someone asks for it. Like Svn2Rss, I need to create an asynchronous way to output it.

If I have those core components working, I can easily create an administration interface and a UI to show my feed.

If you are interested into this project, you can fund it and/or join the mailing list:

Google Groups

Subscribe to Funnel Atom and RSS merger
Email:
Visit this group

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.