termux-bookmark

v1.0.0
Add bookmarks using the share menu on Android

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

npm i termux-bookmark

Metadata

  • MIT
  • Whatever
  • Adam Quinton
  • released 7/21/2020

Downloads

Maintainers