termux-bookmark

1.0.0 • Public • Published

Add bookmarks using the share menu on Android

Instructions

  1. Install Termux
  2. Open Termux and issue the commands in the next steps
  3. Update packages: $ apt update && apt -y upgrade
  4. Install Node.js $ apt install nodejs
  5. Install the termux-bookmark npm package: $ npm i --global termux-bookmark
  6. Create the directory for the script that will run whenever a URL is shared using Termux: $ mkdir ~/bin
  7. Create a script with $ nano ~/bin/termux-url-opener with the following contents:
#!/bin/bash 
NPX_PATH=/data/data/com.termux/files/usr/bin/npx
BOOKMARK_URL=$1
 
env BOOKMARK_SERVER_ROOT=https://<your-bookmark-server> $NPX_PATH bookmark $BOOKMARK_URL
 
termux-notification --title "Bookmarked" --content "$url"
 
exit
  1. Mark the script as executable: $ chmod +x ~/bin/termux-url-opener
  2. Install the Termux API

You can now use the Android share menu to add bookmarks to your bookmark-server

Readme

Keywords

none

Package Sidebar

Install

npm i termux-bookmark

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.75 kB

Total Files

4

Last publish

Collaborators

  • zvakanaka