An open API service indexing awesome lists of open source software.

https://github.com/tmiland/shlink.sh

Shorten url using shlink via REST API.
https://github.com/tmiland/shlink.sh

bash bash-script bash-scripting rest-api shell shell-script shell-scripting shell-scripts shellscript shlink

Last synced: 3 months ago
JSON representation

Shorten url using shlink via REST API.

Awesome Lists containing this project

README

        

![Shellcheck CI](https://github.com/tmiland/shlink.sh/workflows/Shellcheck%20CI/badge.svg)
![GH Language](https://img.shields.io/github/languages/top/tmiland/shlink.sh)
![GH stars](https://img.shields.io/github/stars/tmiland/shlink.sh)
![GH tag](https://img.shields.io/github/v/tag/tmiland/shlink.sh)
![GH License](https://img.shields.io/github/license/tmiland/shlink.sh)

# shlink.sh

Shorten url using [shlink](https://github.com/shlinkio/shlink) via REST API.

## 🔥 Usage

```bash
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 ] [-t ]
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]
: [choice] action to perform [options: shorten,info,check,env,update]
```

## ⚡️ Examples

```bash
> ./shlink.sh shorten
# Shorten url using shlink via REST API
```
or symlink
run
```bash
ln -s ~/.shlink.sh/shlink.sh ~/.local/bin/shlink
export PATH=$HOME/.local/bin:$PATH
# Add to .bashrc / .zshrc
```
then
```bash
> shlink shorten
# Shorten url using shlink via REST API
```

![shlink.sh.gif](/assets/shlink.sh.gif)

## 🚀 Installation

with `git`

```bash
git clone https://github.com/tmiland/shlink.sh.git $HOME/.shlink.sh
cd $HOME/.shlink.sh
```
with [install](install) script
```bash
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._

## 📝 CHANGELOG
All notable changes to this project will be documented in [this file](CHANGELOG.md).

## ✍ Acknowledgements

- source script from [gflorian/shlinkify](https://github.com/gflorian/shlinkify)
- script created with [bashew](https://github.com/pforret/bashew)

## Donations
Coindrop.to me

## Web Hosting

Sign up for web hosting using this link, and receive $200 in credit over 60 days

DigitalOcean Referral Badge

### Disclaimer

*** ***Use at own risk*** ***

### License

[![MIT License Image](https://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/MIT_logo.svg/220px-MIT_logo.svg.png)](https://github.com/tmiland/shlink.sh/blob/master/LICENSE)

[MIT License](https://github.com/tmiland/shlink.sh/blob/master/LICENSE)

© 2022 Tommy Miland