Get notified via a telegram bot when your bash command finished via the command line or from any python code.
user@host $ norby "echo hi"
executing command echo hi
hi
user@host $ norby ./broken_workflow.sh
your job got killed with: some_error
from norby import send_msg
results = run_very_long_workflow()
send_msg(f'Very long workflow finished. The results are: {results}.')
The package is available via the Chymeric Overlay:
emerge norby
pip install norby
- Install
norby
- Create bot in telegram by messaging
BotFather
with/newbot
to receive the bot ID - write
/start
to new bot to start it - write something to new bot and go to
https://api.telegram.org/bot<token>/getUpdates
to get the chat_id - fill token and chat_id in the
norby_config.ini
- move the config to
~/.config/norby_config.ini