buckket / twtxt

Decentralised, minimalist microblogging service for hackers.
http://twtxt.readthedocs.org/en/stable/
MIT License
1.92k stars 79 forks source link

Support for RSS and Atom feeds #57

Closed erlehmann closed 8 years ago

erlehmann commented 8 years ago

A lot of websites already provide feeds in RSS or Atom format. Popular browsers, like Mozilla Firefox, Microsoft Internet Explorer or Safari include features to view such feeds and subscribe to them. Using the Python feedparser module twtxt could be used to subscribe to such a feed without lots of additional code.

This would also sidestep any debate regarding embedded media, metadata etc. as those who want metadata could always just provide Atom feeds (RSS is less capable). I have written a script to convert twtxt files to Atom feeds which could be patched for more metadata if so desired: http://news.dieweltistgarnichtso.net/bin/twtxt2atom

erlehmann commented 8 years ago

Here is a BBC feed for example: http://feeds.bbci.co.uk/news/rss.xml

timofurrer commented 8 years ago

I really like this idea! It would be nice to have it in a plugin rather then in main code base. There is nothing yet setup regarding a plugin system .. and I think there is still a lot unclear about the interfaces. It could be an option to implement things like this in the main code base until we figure out possible interfaces and to check what suits best - although I'm not really a fan of this approach. I'd rather do some brainstorming in another issue and implement some prototypes!

erlehmann commented 8 years ago

I think that including a plugin system for something like that would be a lot of overhead.

>>> from feedparser import parse
>>> feed = parse('http://daten.dieweltistgarnichtso.net/tmp/docs/twtxt.xml')
>>> feed.updated
'Tue, 09 Feb 2016 21:25:59 GMT'
>>> entry = feed.entries[-1]
>>> entry.author, entry.updated, entry.summary
('erlehmann', '2016-02-05T20:44:00Z', 'Hab gewixt.'
timofurrer commented 8 years ago

It's not just for this use case but I'm just saying if we would have one - I would implement it as a plugin.

DracoBlue commented 8 years ago

Plugin discussion at #59

erlehmann commented 8 years ago

@timofurrer if you implement something basic as this as a plugin, users may not use it. With the exception of Google Chrome, I think, all major browsers do handle Atom feeds in a way that needs no additional configuration. Optional features always bloat code size compared to a stable feature set and make testing more difficult.

buckket commented 8 years ago

I see why this feature might be useful for some people, it could even help to further grow twtxt’s ecosystem. Nonetheless this should not be included in the main code base. I for one would most likely not use it. The problem twtxt tries to solve should be communicated clearly, and I don’t want it to become just "another feed reader", by encouraging the use of Atom-feeds.

@erlehmann If we have a plugin system ready feel free to contribute. :+1:

erlehmann commented 8 years ago

@buckket there is a patch at http://daten.dieweltistgarnichtso.net/src/twtxt-atom-rss-feeds.patch. It adds about 10 lines of code. Please merge.

timofurrer commented 8 years ago

@erlehmann please use github workflow and submit patch as PR - thanks.

erlehmann commented 8 years ago

@timofurrer I already sent @buckket the patch using “git request-pull”. But I do not want to make it difficult for people to merge it, so I have created a GitHub-flavored pull request at https://github.com/buckket/twtxt/pull/88.

erlehmann commented 8 years ago

For those interested, I have created a repository for a fork that includes Atom/RSS support (and is otherwise identical): https://github.com/erlehmann/twtxt2