-
-
Save fmartingr/88a258bfad47fb00a3ef9d6c38e5699e to your computer and use it in GitHub Desktop.
script to import pocket entries into shiori with text, images etc. instead of plain bookmarks.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Extracting URLs from the exported HTML from getpocket.com/export | |
# In the following line $1 is the exported HTML from pocket | |
# which will be passed to this script as a CLI parameter | |
grep -Eoi '<a [^>]+>' $1 | grep -Eo 'href="[^\"]+"' | cut -d'=' -f 2- | tr -d '"' | tac > pocket2shiori.txt | |
# Reading the URLs one by one and adding to shiori | |
while IFS= read -r line; do | |
shiori add $line | |
done < pocket2shiori.txt | |
rm pocket2shiori.txt | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a little slower, but I have used it to add tags from the export as well.