Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some feeds have only the last X entries #239

Closed
lemon24 opened this issue May 31, 2021 · 3 comments
Closed

Some feeds have only the last X entries #239

lemon24 opened this issue May 31, 2021 · 3 comments

Comments

@lemon24
Copy link
Owner

lemon24 commented May 31, 2021

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 #96 (comment)), but for existing feeds.

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

@lemon24
Copy link
Owner Author

lemon24 commented Oct 20, 2021

To do:

  • add a added_by entry attribute (feed, user etc.)
  • (maybe) add first_updated, so user entries can have updated none (2.0 backwards compatibility breaks #183 / Entries change without updated being bumped #179 (comment))
    • renamed to added
  • add an add_or_update_entries()-like Reader method
    • it should likely be only "add" (no update, at least not by default)
    • requires exposing EntryData, and finding defaults for EntryUpdateIntent
    • delete_entry() Reader method (only for entries added by add_entry())
  • (maybe, later) way of extracting page content, maybe similar to Some websites don't have feeds #222
  • expose a limited version (id/link, title) in the web app
  • entry_dedupe interaction
  • tests
  • docs
  • changelog

lemon24 added a commit that referenced this issue Oct 21, 2021
lemon24 added a commit that referenced this issue Oct 21, 2021
lemon24 added a commit that referenced this issue Oct 21, 2021
lemon24 added a commit that referenced this issue Oct 21, 2021
lemon24 added a commit that referenced this issue Oct 22, 2021
lemon24 added a commit that referenced this issue Oct 22, 2021
lemon24 added a commit that referenced this issue Oct 22, 2021
lemon24 added a commit that referenced this issue Oct 22, 2021
lemon24 added a commit that referenced this issue Oct 22, 2021
lemon24 added a commit that referenced this issue Oct 24, 2021
@lemon24
Copy link
Owner Author

lemon24 commented Oct 26, 2021

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:

  • it's nice to be able to pass an arbitrary Entry-like object
  • creating a new object (dict or EntryData) is not too much of a bother
  • requiring the user to build a new EntryData object adds some cognitive overhead
  • the EntryData object should be mutable, which means neither reader.types.Entry nor reader._types.EntryData can inherit it

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 (#247 (comment)).

@lemon24
Copy link
Owner Author

lemon24 commented Oct 27, 2021

Decisions:

  • add_entry(entry: Any), leave fancy typing for later
  • user entries can't be updated
  • delete_entry() only deletes user entries
  • entry_dedupe doesn't distinguish between user and non-user entries (there may be undesired side-effects to this, but eh...)

lemon24 added a commit that referenced this issue Oct 27, 2021
lemon24 added a commit that referenced this issue Oct 27, 2021
lemon24 added a commit that referenced this issue Oct 27, 2021
lemon24 added a commit that referenced this issue Oct 28, 2021
lemon24 added a commit that referenced this issue Oct 28, 2021
lemon24 added a commit that referenced this issue Oct 28, 2021
@lemon24 lemon24 closed this as completed Oct 28, 2021
@lemon24 lemon24 mentioned this issue Oct 28, 2021
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant