mirror of
https://github.com/go-shiori/shiori.git
synced 2024-12-26 17:51:10 +08:00
Moved the shell script to a gist, so it is easy to download using curl or wget, instead of having to copy paste code.
parent
6b469ce378
commit
c5852c5231
1 changed files with 10 additions and 24 deletions
34
Usage.md
34
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 '<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 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'
|
||||
|
|
Loading…
Reference in a new issue