Closed erlehmann closed 8 years ago
Here is a BBC feed for example: http://feeds.bbci.co.uk/news/rss.xml
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!
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.'
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.
Plugin discussion at #59
@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.
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:
@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.
@erlehmann please use github workflow and submit patch as PR - thanks.
@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.
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
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