Shorten url using shlink via REST API.
Program: shlink.sh 0.0.1 by @tmiland
Updated: 2022-11-30
Description: Shorten url using shlink via REST API.
Usage : shlink.sh [-h] [-q] [-v] [-f] [-l <log_dir>] [-t <tmp_dir>] <action>
Flags, options and parameters:
-h|--help : [flag] show usage [default: off]
-q|--quiet : [flag] no output [default: off]
-v|--verbose : [flag] also show debug messages [default: off]
-f|--force : [flag] do not ask for confirmation (always yes) [default: off]
-l|--log_dir <?> : [option] folder for log files [default: $HOME/.shlink.sh/log]
-t|--tmp_dir <?> : [option] folder for temp files [default: /tmp/shlink.sh]
<action> : [choice] action to perform [options: shorten,info,check,env,update]
> ./shlink.sh shorten
# Shorten url using shlink via REST API
or symlink run
ln -s ~/.shlink.sh/shlink.sh ~/.local/bin/shlink
export PATH=$HOME/.local/bin:$PATH
# Add to .bashrc / .zshrc
then
> shlink shorten
# Shorten url using shlink via REST API
with git
git clone https://github.com/tmiland/shlink.sh.git $HOME/.shlink.sh
cd $HOME/.shlink.sh
with install script
curl -sSL https://tmiland.github.io/shlink.sh/install | bash
- You will be prompted for API key and domain, if not set in .env on first run
- A .env file will be created and sourced automatically.
All notable changes to this project will be documented in this file.
- source script from gflorian/shlinkify
- script created with bashew
Sign up for web hosting using this link, and receive $200 in credit over 60 days
*** Use at own risk ***
© 2022 Tommy Miland