omnivore-app/omnivore

Archived Articles unarchiving, and saved time changing, after article gets populated.

Opened this issue · 3 comments

I've been working on a project to port over my pocket articles from Pocket to Omnivore. I've managed to import them all, and change the dates to reflect when they were added on my Pocket account.

However, presumably because of the large number of files imported, I've noticed that some articles take upwards of an hour to populate. This is not much of a problem for me, a vast majority of my stories are archived.

When these articles finally get populated there two things happen: The save date gets changed (to the date it was populated) and it loses its archived status.

Expected Behaviour:

Files that take a long time to populate keep the metadata (savedAt, archived) that a user has applied to them

Actual Behaviour:

The saved date gets updated to the time the article was populated. The archived flag is lost and pages appear in my inbox.

As a work around I have another script that uses the ids of the articles and - after everything is populated - applies the archive and savedAt updates again.

For some added context: This is the tool I used to grab the articles: https://github.com/daviddavo/pocket2omnivore/tree/main

Since I saved the output to a SQLite Database I was able to get the ids and re-add the times when everything had settled.

Yes, with Pocket we do have to re-fetch the content since their exports only include URLs, can I ask how you were archiving? Using the API?

Yes, the html file contains some metadata about the article - including the saved time and whether it is archived.

So when I import it I save the link, then call update to change the savedAt time and then call archive to archive it.

But since it imports like 3000 articles some of them can be slow to populate - so some get unarchived