Coder Social home page Coder Social logo

Share/send to web page about shiori HOT 1 CLOSED

JPFrancoia avatar JPFrancoia commented on June 11, 2024
Share/send to web page

from shiori.

Comments (1)

Monirzadeh avatar Monirzadeh commented on June 11, 2024

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.

from shiori.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.