Moved the shell script to a gist, so it is easy to download using curl or wget, instead of having to copy paste code.

robocopAlpha 2020-08-22 14:14:38 +03:00
parent 6b469ce378
commit c5852c5231

@ -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 '<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
```
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 youre 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'