lemon24 / reader

A Python feed reader library.
https://reader.readthedocs.io
BSD 3-Clause "New" or "Revised" License
450 stars 38 forks source link

Some feeds have only the last X entries #239

Closed lemon24 closed 3 years ago

lemon24 commented 3 years ago

Use case:

  1. Find a website via an article.
  2. Want to add website feed to reader and mark that article as important.
  3. Article does not appear in feed because feed contains only the last X articles, and the article fell off the end of the feed.

A possible solution is "share anything" articles (mentioned in https://github.com/lemon24/reader/issues/96#issuecomment-460077441), but for existing feeds.

Another solution might be to use the mechanism from #222 to backfill old articles.

lemon24 commented 3 years ago

To do:

lemon24 commented 3 years ago

add_entry() mock-up: https://gist.github.com/lemon24/047f71abe76c47661634459eada7b50a

Based on thinking and talking with people about 00-api.py in the linked gist:

A Union[EntryDataLikeProtocol, EntryDataTypedDict] argument accommodates all of the above, and can (almost) be made to work with typing (example in 01-typing.py).

It may be a good idea to allow the nested types (Content, Enclosure) to be typed dicts as well (in 79a18c5). In cases like this, I'd like there to be a standard serialization library in Python (like Rust has Serde); maybe it's time to give mashumaro a try (https://github.com/lemon24/reader/issues/247#issuecomment-886022571).

lemon24 commented 3 years ago

Decisions: