RssFwd v0.2
Puberty is never quite easy. RssFwd has taken a baby step to v0.2 today.. a complete rewrite.
In Ruby. In Rails actually. Source code available here [update: all downloads are here]. Feel free to give it a try. I won't spam you, promise.
The original TODO list included a web-interface to listing, subscribing and other end-user related activities which will be too boring to do with hand-coded file/database access, request, response, blah blah. So, decided to piggyback on rails' framework - which is a pretty pleasant experience.
I'm not using any RSS/Atom APIs here, partly because Ruby support for RSS or Atom, etc is quite rudimentary and considering the many RSS versions + Atom formats to support.. I think I'm better off with a standards-ignorant (lenient) feed reader. Any problems with anybody's feed? Let me know. Fixing is not hard at all.
Update:
Take RssFwd with you
- Right-click and bookmark this link: RF Preview This!
- Go to any RSS/Atom page (e.g. Experiment with target="_blank">this feed )
- Click on your new bookmarks
- That's it!
RF Preview This! : You get a readable format immediately and the option to subscribe.
Now go, syndicate the planet..
Changed activerecord/lib/active_record/base.rb (sanitize)
old: object.to_s.gsub(/([;:])/, "").gsub('##', '##').gsub(/'/, "''") # ' (for ruby-mode)
new: object.to_s.gsub(/(;|:)/, "\\\\\\\&").gsub('##', '##').gsub(/'/, "''") # ' (for ruby-mode)
strange why I need so many \ but the idea is to escape into \; or \: instead of blatantly removing the ; or : characters. Spent quite sometime tracking it down this one (cock eyed) when my WHERE url = '%s' didn't work as expected ;-)
Also, changed http-access2/http.rb (set_header)
old: set('Host', "#{@request_uri.host}:#{@request_uri.port}")
new: set('Host', "#{@request_uri.host}")
set('Host', "#{@request_uri.host}:#{@request_uri.port}") unless @request_uri.port = 80
apparently rubyforge.org (sic) had problems with the host:port format and kept returning me HTTP 302, with the same Location: value. This naturally freaked out my HTTPAccess2::Client object. The new host-only header works.. so -shrugs- not sure who is the broken one.
Hm. Did I mention, RssFwd is GPL ?
TODO:
- Integrate with RSSScraper or something easier, so that any webpage can be syndicated.
- Allow server-mode at port 110, ala rss2email? Is it truely easier for non-techies?
- Show latest few polled articles from all sources (copyright infringements?)
- W3C-compliant style image links to easily indicate subscribe-able feeds.
- Work on conserving bandwidth