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

Improved import from Pocket (HTML export) #252

Closed
dchakro opened this issue May 29, 2020 · 4 comments
Closed

Improved import from Pocket (HTML export) #252

dchakro opened this issue May 29, 2020 · 4 comments

Comments

@dchakro
Copy link

dchakro commented May 29, 2020

Hi,

I am not familiar with Go or this project's codebase, but I am running shiori on docker.
I figured out a way to import pocket links where the links from pocket is used to popualate shiori's database.

Feature:
Import links from pocket so that they have the title, image (if any) and

Proposed Solution:
This shell script (uses commands bundled within the shiori docker):

#!/bin/sh
# optional: wget -O pocket.html <link to your pocket exports>
grep -Eoi '<a [^>]+>' pocket.html | grep -Eo 'href="[^\"]+"' | cut -d'=' -f 2 | tr -d '"' | tac > Pocket2Shiori.txt

while IFS= read -r line; do
    shiori add $line
done < Pocket2Shiori.txt

rm Pocket2Shiori.txt

shiori add does all the heavy lifting here. The shell script just parses the pocket output to fish out the html URLs.

@deanishe
Copy link
Contributor

deanishe commented Aug 6, 2020

Nice solution. (I use something similar to import URLs from Pinboard.)

Would you add this to the wiki? It's a useful tip and I think more people will find it there.

@dchakro
Copy link
Author

dchakro commented Aug 7, 2020

Hi @deanishe
Thank you for taking responsibility of this lovely project.
I have happily added the instructions to the wiki.
https://github.com/go-shiori/shiori/wiki/Usage#improved-import-from-pocket

Marking this issue as closed.

@z3cko
Copy link

z3cko commented Jan 17, 2021

Sadly the current importer does not take into account the title of the URLs as exported by pocket. I created a issue #292 describing the problem.

@robflate
Copy link

robflate commented Feb 25, 2022

I ran this and it correctly imported my bookmarks with images and the title but it did not import my tags.

I also ran the built in shiori pocket method which correctly imported my tags but not the title or images.

How can I get titles, images and tags from Pocket? Thanks.

Note: I'm running the latest version in docker using a MYSQL database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants