mirror of
https://codeberg.org/Reuh/feather.git
synced 2025-10-27 18:19:32 +00:00
Compare commits
No commits in common. "595be10876be35adf5d744121bacb23670a3efdd" and "d77a92cb829925110f7fada1da4ddc9e40f581fe" have entirely different histories.
595be10876
...
d77a92cb82
3 changed files with 11 additions and 17 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
[project]
|
[project]
|
||||||
name = "feather"
|
name = "feather"
|
||||||
version = "1.1.1"
|
version = "1.1.0"
|
||||||
authors = [ { name = 'Étienne "Reuh" Fildadut' } ]
|
authors = [ { name = 'Étienne "Reuh" Fildadut' } ]
|
||||||
description = "file-based RSS reader client"
|
description = "file-based RSS reader client"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
||||||
|
|
@ -160,24 +160,18 @@ class FeatherApp:
|
||||||
article.write()
|
article.write()
|
||||||
updated_articles += 1
|
updated_articles += 1
|
||||||
|
|
||||||
# Remove or mark-as-read articles that we didn't get from the server but are in the JSON directory
|
# Remove articles that we didn't get from the server but are in the JSON directory
|
||||||
removed_articles = 0
|
removed_articles = 0
|
||||||
article_cutoff_timestamp = (
|
article_cutoff_timestamp = (
|
||||||
datetime.now().timestamp() - config.keep_read_articles_for
|
datetime.now().timestamp() - config.keep_read_articles_for
|
||||||
)
|
)
|
||||||
for article in self.iter_articles():
|
for article in self.iter_articles():
|
||||||
if article.id not in grabbed_article_paths:
|
if (
|
||||||
# we only sync unread: articles we didn't get from the server were read or purged
|
# we sync all articles: remove all articles that aren't on the server
|
||||||
if config.only_sync_unread_articles:
|
not config.only_sync_unread_articles
|
||||||
if article.last_write < article_cutoff_timestamp:
|
# we only sync unread: only remove articles that are too old
|
||||||
article.delete()
|
or article.last_write < article_cutoff_timestamp
|
||||||
removed_articles += 1
|
) and article.id not in grabbed_article_paths:
|
||||||
elif article.unread:
|
|
||||||
article.unread = False
|
|
||||||
article.regenerate()
|
|
||||||
updated_articles += 1
|
|
||||||
# we sync all articles: articles we didn't get from the server were purged
|
|
||||||
else:
|
|
||||||
article.delete()
|
article.delete()
|
||||||
removed_articles += 1
|
removed_articles += 1
|
||||||
|
|
||||||
|
|
|
||||||
2
uv.lock
generated
2
uv.lock
generated
|
|
@ -69,7 +69,7 @@ wheels = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "feather"
|
name = "feather"
|
||||||
version = "1.1.1"
|
version = "1.1.0"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "google-reader" },
|
{ name = "google-reader" },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue