reader 3.16 released – Archived feed

December 2024 ∙ four minute read ∙

Hi there!

I'm happy to announce version 3.16 of reader, a Python feed reader library.

What's new? #

Here are the highlights since reader 3.15.

Archived feed #

It is now possible to archive selected entries to a special "archived" feed, so they can be preserved once the original feed is deleted; this is similar to the Tiny Tiny RSS feature of the same name (which is where I got the idea in the first place).

At high level, this is available in the web app as an "archive all" button that archives currently-visible entries for a feed; in the re-design, the plan is to archive important entries by default as part of the "delete feed" confirmation page. It may also be a good idea to make this the default through a plugin before then, so that user interaction is not required for it to happen.

At low level, this is enabled by archive_entries() (I finally gave up and added a utils module 😅), and the copy_entry() method.

Entry source #

reader now parses and stores the entry source, containing metadata about the source feed if the entry is a copy – this can be the case when a feed aggregates articles from other feeds. The source URL can be used for filtering entries, and its title is part of the feed title during searches.

This was a side-project for the archived feed functionality, since the source of archived entries gets set to their original feed.

Bug fixes #

Also during archived feed implementation, I found out foreign keys were disabled in threads other than the one that created the reader instance, so e.g. deleting a feed from another thread would not delete its entries. This is now fixed.

The bug existed since multi-threaded use became allowed in version 2.15. Serving the web application with the serve command is known to be affected; serving it without threads (e.g. the default uWSGI configuration) should not be affected.

Attention

Your database may be in an inconsistent state. The migration to 3.16 will check for this on first use; issues will be reported as a FOREIGN KEY constraint failed storage integrity error; see the changelog for details.


That's it for now. For more details, see the full changelog.

Want to contribute? Check out the docs and the roadmap.

Learned something new today? Share this with others, it really helps!

What is reader? #

reader takes care of the core functionality required by a feed reader, so you can focus on what makes yours different.

reader in action reader allows you to:

  • retrieve, store, and manage Atom, RSS, and JSON feeds
  • mark articles as read or important
  • add arbitrary tags/metadata to feeds and articles
  • filter feeds and articles
  • full-text search articles
  • get statistics on feed and user activity
  • write plugins to extend its functionality

...all these with:

  • a stable, clearly documented API
  • excellent test coverage
  • fully typed Python

To find out more, check out the GitHub repo and the docs, or give the tutorial a try.

Why use a feed reader library? #

Have you been unhappy with existing feed readers and wanted to make your own, but:

  • never knew where to start?
  • it seemed like too much work?
  • you don't like writing backend code?

Are you already working with feedparser, but:

  • want an easier way to store, filter, sort and search feeds and entries?
  • want to get back type-annotated objects instead of dicts?
  • want to restrict or deny file-system access?
  • want to change the way feeds are retrieved by using Requests?
  • want to also support JSON Feed?
  • want to support custom information sources?

... while still supporting all the feed types feedparser does?

If you answered yes to any of the above, reader can help.

The reader philosophy #

  • reader is a library
  • reader is for the long term
  • reader is extensible
  • reader is stable (within reason)
  • reader is simple to use; API matters
  • reader features work well together
  • reader is tested
  • reader is documented
  • reader has minimal dependencies

Why make your own feed reader? #

So you can:

  • have full control over your data
  • control what features it has or doesn't have
  • decide how much you pay for it
  • make sure it doesn't get closed while you're still using it
  • really, it's easier than you think

Obviously, this may not be your cup of tea, but if it is, reader can help.