Hacker News new | ask | show | jobs
by quintonish 2047 days ago
termux-url-opener has been an excellent tool to easily make use of Android's share menu. Taking inspiration from "YouTube-DL the easy way on Android" [1], I made a script that adds a URL to my bookmarks server [2]. It'd be even better to write a script that has some rules or a prompt so that different URLs can be handled differently (e.g. video URLs prompt for download, or there could be a prompt to add the page to archive.org).

[1] https://www.reddit.com/r/Piracy/comments/baufql/youtubedl_th...

[2] https://github.com/zvakanaka/termux-bookmark#readme

1 comments

Here's my termux-url-opener:

$ cat ~/bin/termux-url-opener #!/data/data/com.termux/files/usr/bin/env bash

read -ep "[c]ast or [d]ownload: " -i "c" choice case "${choice}" in c|C) catt cast "${1}" ;; d|D) pip install --upgrade youtube-dl cd ~/storage/movies youtube-dl "${1}" ;; *) echo "Sorry, that's invalid." exit 65 ;; esac