Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zingmars/termux-scripts
Collection of small scripts I wrote for use with Termux.
https://github.com/zingmars/termux-scripts
bash curl shorten termux upload
Last synced: 3 months ago
JSON representation
Collection of small scripts I wrote for use with Termux.
- Host: GitHub
- URL: https://github.com/zingmars/termux-scripts
- Owner: zingmars
- License: gpl-3.0
- Created: 2017-02-05T16:55:55.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-12-28T13:10:32.000Z (about 5 years ago)
- Last Synced: 2024-08-02T15:47:10.066Z (6 months ago)
- Topics: bash, curl, shorten, termux, upload
- Language: Shell
- Size: 17.6 KB
- Stars: 45
- Watchers: 7
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
Termux-upload script collection
===Since there's no ShareX/Screencloud or any other similar software for android, I wrote a few shell scripts to be used with termux to recreate at least some of the uploading functionality. Please note that I wrote this for my personal use (Linx+YOURLS), and a lot of modification will be needed if you end up using this for your own setup, but at least it's a good place to start. These scripts require [termux](https://play.google.com/store/apps/details?id=com.termux), [termux-api](https://play.google.com/store/apps/details?id=com.termux.api). After installing both run `pkg update && pkg install termux-api curl jq` and you should be ready go.
# Installation instructions
If entering them by hand on a phone or tablet, I recommend using [Hacker's Keyboard](https://f-droid.org/en/packages/org.pocketworkstation.pckeyboard/) which has arrow keys and a tab button for autocomplete.```bash
$ pkg update
$ pkg install wget # termux come with busybox wget by default that doesn't support https
$ hash -r
$ wget https://github.com/zingmars/termux-scripts/archive/master.zip
$ unzip master.zip
$ pkg install vim #or nano or whatever editor you want
$ cd termux-scripts-master
$ chmod +x *.sh
# ! Edit your files, i.e. vim upload.sh
$ pkg install termux-api termux-tools curl jq
# Install the scripts
$ cd $HOME && mkdir bin && ln -s $HOME/termux-scripts-master/upload.sh $HOME/bin/termux-file-editor
$ ln -s $HOME/termux-scripts-master/delete.sh /data/data/com.termux/files/usr/bin/delete-file
$ ln -s $HOME/termux-scripts-master/shorten.sh /data/data/com.termux/files/usr/bin/shorten
```# Script descriptions
## upload.shSimple upload script. Edit it's curl upload commands. Afterwards place it in termux's `$HOME/bin/` rename it to termux-file-editor (or just symlink it) and then share your files to Termux like you would to any other app. A bit hackish, but it works.
## delete.sh
Sends a DELETE request to an URL either passed as a parameter or from a file generated by upload.sh. Might not be needed for your host.
## shorten.sh
Shortens the passed URL. Uses a private YOURLS instance by default.