Skip to content

tikerlade/exec-notifier

Repository files navigation

Execution Notifier 💬

PyPI Code style: black Actions Status Actions Status pre-commit.ci status PyPI - Python Version

This tool provides you ability to send yourself information about looong executed command when it is done. Information will be sent using Telegram Bot. Logs and error messages (if they'll occur) will be delivered too.

CLI execution notification

Notification example

Notebook execution notification

Notification example

⚠️ If your log will be too long (longer 1_000_000 signs we'll not send it).

Prerequisites 📑

  1. Python 3.4 or higher
  2. Telegram ID - get it from @exec_notifier_bot by using /start command.

CLI Installation and running

You need to run your commands in quotes("") when passing script to run.

>>> pip install exec-notifier
>>> exec_notifier config --telegram_id=YOUR_TELEGRAM_ID
>>> exec_notifier notify "[your_command_here]"

Jupyter extension installation

If you didn't have any nbextensions yet you need to download them by the following instrucions.

Run the code from install_nbextenstion.sh locally. You can do this by the following command:

curl  -LJO https://raw.githubusercontent.com/tikerlade/exec-notifier/master/install_nbextension.sh
chmod +x install_nbextension.sh
./install_nbextension.sh
rm -rf install_nbextension.sh

After this command go to your Jupyter nbextensions setup page: provide your Telegram ID and activate exec_notifier.

Examples

>>> exec_notifier notify "ls -l | head"
>>> exec_notifier notify "ls -l > output.txt"
>>> exec_notifier notify "ls -l && sleep 3 && ps"
>>> exec_notifier notify "zip Downloads"

Future 🔜

  • Your own bot support will be added

About

Tool to notify you when execution of command will be ended. 💻 ➡️ 📱

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published