https://github.com/jimmy2027/norby
Get notified via a telegram bot when your bash command finished
https://github.com/jimmy2027/norby
bot telegram-bot
Last synced: over 1 year ago
JSON representation
Get notified via a telegram bot when your bash command finished
- Host: GitHub
- URL: https://github.com/jimmy2027/norby
- Owner: Jimmy2027
- License: gpl-3.0
- Created: 2020-12-04T16:28:39.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-07-11T14:52:50.000Z (almost 4 years ago)
- Last Synced: 2025-02-19T04:48:56.621Z (over 1 year ago)
- Topics: bot, telegram-bot
- Language: Python
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.com/Jimmy2027/NORBY)
[](https://norby.readthedocs.io/en/latest/?badge=latest)
# NORBY
Get notified via a telegram bot when your bash command finished via the command line or from any python code.
# Usage
```console
user@host $ norby "echo hi"
executing command echo hi
hi
user@host $ norby ./broken_workflow.sh
your job got killed with: some_error
```
````python
from norby import send_msg
results = run_very_long_workflow()
send_msg(f'Very long workflow finished. The results are: {results}.')
````
# Installation
### Via portage:
The package is available via the [Chymeric Overlay](https://github.com/TheChymera/overlay):
```
emerge norby
```
### Via pip:
```
pip install norby
```
# Setup:
- 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/getUpdates` to get the chat_id
- fill token and chat_id in the `norby_config.ini`
- move the config to `~/.config/norby_config.ini`