Skip to main content

A simple command line tool to send notifications to your telegram bot

Project description

OpenNTFY

A simple command line tool to send notifications to your telegram bot

Installation

OpenNTFY is installed as a python module using pip

pip install OpenNTFY

the first time run the following command to configure OpenNTFY

OpenNTFY --config

This will store your telegram bot token and chat id in the config file in:

linux
~/.config/OpenNTFY/config.json
windows
C:\Users\{username}\AppData\Roaming\OpenNTFY\config.json

Example usage

Send a message to your telegram bot

OpenNTFY "Test message"

Send a message to your telegram bot after the execution of a command

sudo apt upgrade; OpenNTFY "Upgrade terminated on {N}"

Send a message to your telegram bot after the execution of a command with the result of the command

long_program | OpenNTFY "Program terminated with result:"

Send a message to your telegram bot after the execution of a command and also a periodic message with the live view of it

:warning: this is not supported on

OpenNTFY -p 5m30s "watch ip address" "End message"

Send a file to your telegram bot

OpenNTFY -f /path/to/file "Message with file"

Supported placeholders

You can use the following placeholders in your messages:

  • {N} - Name of the computer running the command
  • {T} - Time of the command execution
  • {D} - Date of the command execution

ToDo

  • Add config file
  • Add install script
  • Implement periodic notifications
  • Add initial guided setup
  • Add support for file sending
  • Add verbose mode
  • Add installation guide
  • Fix periodic send support for windows

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openntfy-0.1.2.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

OpenNTFY-0.1.2-py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page