-
Notifications
You must be signed in to change notification settings - Fork 572
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
feat: allow import of newer pocket data export files in csv format #1023
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1023 +/- ##
==========================================
- Coverage 34.71% 34.28% -0.44%
==========================================
Files 61 61
Lines 5326 5393 +67
==========================================
Hits 1849 1849
- Misses 3253 3320 +67
Partials 224 224 ☔ View full report in Codecov by Sentry. |
Hey @melnary, thanks for the contribution! I'm not super famiiar with pocket and their exports so for me if you tested it it's good to go. Can you take a look at the CI errors and correct them though? |
@fmartingr Hi! I was wondering where the CI was at :3 |
Dont worry about coverage, the linter errors are here: https://github.com/go-shiori/shiori/actions/runs/12276136781/job/34257042686#step:3:1 |
Signed-off-by: Mel <einebeere@gmail.com>
@fmartingr Please approve the workflows again, my local linter is reporting no errors, should be good to go! |
Ah and one more thing! I did manage to track down an older HTML export file, to make sure that I didn't end up breaking the HTML import feature, luckily it all still works smoothly! |
That's awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution!
Recently Pocket changed the format of their data export function, switching from HTML files to a zipped folder containing CSV files, delivered in parts of up to 10000 bookmarks.
Other bookmark managers were also affected by this, as seen here: hoarder-app/hoarder#570
This patch allows the
pocket
sub-command to handle these files correctly, expanding it's functionality to import both HTML and CSV files, as I believe the ability to import older exports may still be useful. This is done by a simple file extension check, which I think will suffice for most users.Note that the command still does not process the multiple part files explicitly, so the user has to import them one by one, which I don't think will be too much of a hassle for the user either way. :)
I would appreciate it if someone could test this patch on an older HTML file (or give me one so I could test it myself :3), as I was only able to test it with my own CSV export.