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

Share/send to web page #753

Closed
JPFrancoia opened this issue Oct 13, 2023 · 1 comment · Fixed by #757
Closed

Share/send to web page #753

JPFrancoia opened this issue Oct 13, 2023 · 1 comment · Fixed by #757

Comments

@JPFrancoia
Copy link
Contributor

Hello,

I use a RSS feed reader to read news, mostly on my phone (Android). Right now when I want to read an article later, I send it to me as email. Instead, I would like to send it to Shiori.
However, Shiori is a web app. I do have a working Shiori server. I would like to be able to click on the "share" button in my rss app to send the article link directly to Shiori.
Does anyone do that? If so, how?

@Monirzadeh
Copy link
Collaborator

Monirzadeh commented Oct 14, 2023

it is not prefect but you can use termux.
write a shell script and than add that shell script (you can see api documentation) to share menu (with termux-url-opener).
i think you can use curl in your script.

Update:
something like this can done what you want
replace your URL and username password in script

  1. install termux
  2. open termux and create a file with bellow command
mkdir -p ~/bin
touch ~/bin/termux-url-opener
  1. run chmod +x ~/bin/termux-url-opener
  2. open file with nano ~/bin/termux-url-opener
  3. paste bellow command (update Shiori_URL Username and Password ) and save that with volume down o press Enter to save
#!/bin/bash

# shiori settings
Shiori_URL="http://127.0.0.1:8080"
Username="shiori"
Password="gopher"

token=$(curl -s -X POST -H "Content-Type: application/json" -d '{"username": "'"$Username"'" , "password": "'"$Password"'", "remember": true}' $Shiori_URL/api/v1/auth/login | grep -oP '(?<="token":")[^"]*')

curl -s -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d '{ "url": "'"$1"'", "createArchive": false, "public": 1, "tags": [], "title": "", "excerpt": "" }' $Shiori_URL/api/bookmarks
exit
  1. volume down and x to exit editor.
  2. go to the page you want to add shiori.
  3. share menu
  4. tap on termux.
  5. if you open shiori you see that url add to shiori

now you need just share url with termux your bookmark will add to shiori.

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

Successfully merging a pull request may close this issue.

2 participants