Crates.io | ssup |
lib.rs | ssup |
version | 0.3.5 |
source | src |
created_at | 2021-06-18 18:54:10.464082 |
updated_at | 2021-06-18 19:09:40.963434 |
description | A utility to send notifications to local system or telegram |
homepage | https://shantanugoel.com/ |
repository | https://github.com/shantanugoel/ssup/ |
max_upload_size | |
id | 411849 |
size | 59,203 |
ssup
is a simple cross-platform tool to send notifications via cli to local system or telegram.
It can also be used to get alerted after a long-running (or otherwise) command finishes. This can be used either by specifying the command at the end of the ssup command, or by chaining ssup with other commands. See the examples/CLI options below for more.
# Send a notification to local system
$ ssup -m "Hello world!"
# Send a notification to telegram
$ export SSUP_TG_BOT_TOKEN=<Your telegram bot token>
$ ssup -m "Hello world!" -d telegram -c <your-telegram-chat-id>
# Run a custom command and send notification after it finishes. Advantage of this is that ssup will also report whether command was successful or not.
$ ssup -m "Hello world!" sleep 5
# Alternate ways to run a custom command and send notification after it finishes
$ sleep 5; ssup -m "Hello world!" # Always send notification
$ sleep 5 && ssup -m "Hello world!" # Send notification only on success
$ sleep 5 || ssup -m "Hello world!" # Send notification only on failure
notifica
crate) █████ █████ █████ ████ ████████
███░░ ███░░ ░░███ ░███ ░░███░░███
░░░█████ ░█████ ░███ ░███ ░███ ░███
░░░░███░░░░███ ░███ ░███ ░███ ░███
██████ ██████ ░░████████ ░███████
░░░░░░░ ░░░░░ ░░░░░░░░ ░███░░░
░███
█████
░░░░░
ssup 0.3.5 - Shantanu Goel <shantanu+ssup@shantanugoel.com>
A utility to send notifications to local system or telegram
USAGE:
ssup [OPTIONS] --message <message> [command]
ARGS:
<command> Specify a command/executable to run and notify when it finishes
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-t, --title <title> Optional title for the notification [default: Ssup!]
-m, --message <message> Notify with this message
-d, --destination <destination> Choose where to send the notification to [default: local] [possible values: local, telegram]
--chat-id <chat-id> {Telegram specific option} Chat id to which notification should be sent
--bot-token <bot-token> {Telegram specific option } Optionally specify Telegram bot token in command instead of reading from env
curl https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getUpdates | jq .message.chat.id
$TELEGRAM_BOT_TOKEN
by the token value that you got in step 1curl
and jq
if you don't have them already
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getUpdates
and search for id:
to get the valueFor linux platforms, this crate has a native dependency on libdbus, so you'd need to install a corresponding package (e.g. libdbus-1-dev on debian/ubuntu) before trying to compile it.