I don''t think I''ve mentioned my FeedTools library anywhere except my blog, so I guess maybe I should get around to announcing it more visibly since I''m sure there are plenty of people who could find a use for it. I just released version 0.2.3 yesterday, and work on it is coming along rather quickly. Basically, FeedTools is a Rails-friendly implementation of a caching xml feed parser, quite similar to Mark Pilgrim''s python feedparser library, except with a few extra features, and not nearly as many unit tests (still working on this, trying to get the library to actually pass a port of the same suite of tests that he uses). It can parse any version of RSS or CDF, and I believe it parses Atom 1.0 just fine as well, although I haven''t had the time to write enough unit tests to be certain. The parser automatically handles html sanitization and optionally offers support for the html tidy library. If libtidy is not present, it seamlessly reverts to untidy html output. There''s also fairly extensive support for enclosures and the itunes and yahoo media modules (though there''s probably still quite a bit of work to be done in this area). The caching system is modular, and can use any caching mechanism that conforms to the caching interface. By default, it uses a database feed cache based on ActiveRecord (which, when using Rails, will connect you automatically to the same database that Rails is using). Alternatively, it can run without any caching mechanism at all. Also, the FeedTools library has methods for generating xml for RSS 1.0, 2.0 and Atom 0.3 using the Builder library. This means that feed generation in Rails'' .rxml files is very easy to accomplish (most of the time the view code is a single line). There''s still a lot more work to be done, but so far, it appears to be fairly stable and tends to be quite liberal in what it accepts as input (although I don''t think it''s quite up to the level of Mark Pilgrim''s parser... yet). If anyone spots any bugs, problems, concerns, or design issues, please let me know. Documentation is here: http://sporkmonger.com/projects/feedtools/api/ Example code: slashdot_feed = FeedTools::Feed.open(''http://www.slashdot.org/index.rss'') slashdot_feed.title => "Slashdot" slashdot_feed.description => "News for nerds, stuff that matters" slashdot_feed.link => "http://slashdot.org/" slashdot_feed.items.first.find_node("slash:hitparade/text()").value => "43,37,28,23,11,3,1" -- Bob Aman http://www.sporkmonger.com
+900 This rocks. One project I''ve been working on has been on hold since we realized no such thing was avaliable in Ruby. I''ll be using this real soon. Thanks Bob! -Jesse On 8/12/05, Bob Aman <vacindak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I don''t think I''ve mentioned my FeedTools library anywhere except my > blog, so I guess maybe I should get around to announcing it more > visibly since I''m sure there are plenty of people who could find a use > for it. > > I just released version 0.2.3 yesterday, and work on it is coming > along rather quickly. Basically, FeedTools is a Rails-friendly > implementation of a caching xml feed parser, quite similar to Mark > Pilgrim''s python feedparser library, except with a few extra features, > and not nearly as many unit tests (still working on this, trying to > get the library to actually pass a port of the same suite of tests > that he uses). It can parse any version of RSS or CDF, and I believe > it parses Atom 1.0 just fine as well, although I haven''t had the time > to write enough unit tests to be certain. > > The parser automatically handles html sanitization and optionally > offers support for the html tidy library. If libtidy is not present, > it seamlessly reverts to untidy html output. There''s also fairly > extensive support for enclosures and the itunes and yahoo media > modules (though there''s probably still quite a bit of work to be done > in this area). > > The caching system is modular, and can use any caching mechanism that > conforms to the caching interface. By default, it uses a database > feed cache based on ActiveRecord (which, when using Rails, will > connect you automatically to the same database that Rails is using). > Alternatively, it can run without any caching mechanism at all. > > Also, the FeedTools library has methods for generating xml for RSS > 1.0, 2.0 and Atom 0.3 using the Builder library. This means that feed > generation in Rails'' .rxml files is very easy to accomplish (most of > the time the view code is a single line). > > There''s still a lot more work to be done, but so far, it appears to be > fairly stable and tends to be quite liberal in what it accepts as > input (although I don''t think it''s quite up to the level of Mark > Pilgrim''s parser... yet). If anyone spots any bugs, problems, > concerns, or design issues, please let me know. > > Documentation is here: http://sporkmonger.com/projects/feedtools/api/ > > Example code: > > slashdot_feed = FeedTools::Feed.open(''http://www.slashdot.org/index.rss'') > slashdot_feed.title > => "Slashdot" > slashdot_feed.description > => "News for nerds, stuff that matters" > slashdot_feed.link > => "http://slashdot.org/" > slashdot_feed.items.first.find_node("slash:hitparade/text()").value > => "43,37,28,23,11,3,1" > > -- > Bob Aman > http://www.sporkmonger.com > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- jnewland-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org jnewland.com AIM: jbnewland 706.340.3625
Hi Bob, Nice job! Thanks to your great library, FeedUp!(http://feedup.ivanshi.com)--the web-based rss/atom feeds reader I am recently working on now can handle much more feed formats. FeedUp! is beta now. 2005/8/13, Bob Aman <vacindak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> I don''t think I''ve mentioned my FeedTools library anywhere except my > blog, so I guess maybe I should get around to announcing it more > visibly since I''m sure there are plenty of people who could find a use > for it. > > I just released version 0.2.3 yesterday, and work on it is coming > along rather quickly. Basically, FeedTools is a Rails-friendly > implementation of a caching xml feed parser, quite similar to Mark > Pilgrim''s python feedparser library, except with a few extra features, > and not nearly as many unit tests (still working on this, trying to > get the library to actually pass a port of the same suite of tests > that he uses). It can parse any version of RSS or CDF, and I believe > it parses Atom 1.0 just fine as well, although I haven''t had the time > to write enough unit tests to be certain. > > The parser automatically handles html sanitization and optionally > offers support for the html tidy library. If libtidy is not present, > it seamlessly reverts to untidy html output. There''s also fairly > extensive support for enclosures and the itunes and yahoo media > modules (though there''s probably still quite a bit of work to be done > in this area). > > The caching system is modular, and can use any caching mechanism that > conforms to the caching interface. By default, it uses a database > feed cache based on ActiveRecord (which, when using Rails, will > connect you automatically to the same database that Rails is using). > Alternatively, it can run without any caching mechanism at all. > > Also, the FeedTools library has methods for generating xml for RSS > 1.0, 2.0 and Atom 0.3 using the Builder library. This means that feed > generation in Rails'' .rxml files is very easy to accomplish (most of > the time the view code is a single line). > > There''s still a lot more work to be done, but so far, it appears to be > fairly stable and tends to be quite liberal in what it accepts as > input (although I don''t think it''s quite up to the level of Mark > Pilgrim''s parser... yet). If anyone spots any bugs, problems, > concerns, or design issues, please let me know. > > Documentation is here: http://sporkmonger.com/projects/feedtools/api/ > > Example code: > > slashdot_feed = FeedTools::Feed.open(''http://www.slashdot.org/index.rss'') > slashdot_feed.title > => "Slashdot" > slashdot_feed.description > => "News for nerds, stuff that matters" > slashdot_feed.link > => "http://slashdot.org/" > slashdot_feed.items.first.find_node("slash:hitparade/text()").value > => "43,37,28,23,11,3,1" > > -- > Bob Aman > http://www.sporkmonger.com > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Regards. Yufan