From c5852c52319e32367fb02ea630039cd902b51cec Mon Sep 17 00:00:00 2001 From: robocopAlpha <35454738+robocopAlpha@users.noreply.github.com> Date: Sat, 22 Aug 2020 14:14:38 +0300 Subject: [PATCH] Moved the shell script to a gist, so it is easy to download using curl or wget, instead of having to copy paste code. --- Usage.md | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/Usage.md b/Usage.md index 33ac524..fb6f485 100644 --- a/Usage.md +++ b/Usage.md @@ -104,37 +104,23 @@ To import your bookmarks from [Pocket](https://getpocket.com/) with the text and 1. Export your entries from Pocket by visiting https://getpocket.com/export -2. Save this shell script [*in your docker container or on the device that you are hosting shiori*]. Name it for instance `pocket2shiori.sh`. - - > Tip: checkout the wiki for [opening a console in the docker container](https://github.com/go-shiori/shiori/wiki/Usage/_edit#running-docker-container). - - ```sh - #!/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 ']+>' $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 - ``` - - - -3. Execute the shell script by running: +2. Download [this shell script](https://gist.githubusercontent.com/robocopAlpha/fa43b0e89f884826d3bd60f51e48b078/raw/pocket2shiori.sh). [*You need to download this in your docker container or on the device that you are hosting shiori*]. Name it for instance `pocket2shiori.sh`. + > Tip: checkout the wiki for [opening a console in the docker container](https://github.com/go-shiori/shiori/wiki/Usage/_edit#running-docker-container). + +3. Execute the shell script. + +Here are the commands you need to run: ```sh + curl -sSOL 'https://gist.githubusercontent.com/robocopAlpha/fa43b0e89f884826d3bd60f51e48b078/raw/pocket2shiori.sh' + chmod +x pocket2shiori.sh pocket2shiori.sh 'path_to_your/pocket_export.html' ``` > Tip: If you’re using shiori's docker container, ensure that the exported HTML from pocket is accessible inside the docker container. -4. You should now see `shiori` importing your Pocket entries properly with the text and images. - -5. Optional: Once the import is complete you can clean up by running: +You should now see `shiori` importing your Pocket entries properly with the text and images. +This is optional, but once the import is complete you can clean up by running: ```sh rm pocket2shiori.txt pocket2shiori.sh 'path_to_your/pocket_export.html'