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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file openntfy-0.1.2.tar.gz.

File metadata

  • Download URL: openntfy-0.1.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for openntfy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2da6a2fdaa264336bb2d616c1b7e8ca7714159f898416679ecd82d24150c0c45
MD5 613659f2f2dec197c3a06dfdfcc3fd65
BLAKE2b-256 7f5c64487db697de0c938f06fdba30934aa78475a12bc969ca5b678e31d81e0e

See more details on using hashes here.

File details

Details for the file OpenNTFY-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: OpenNTFY-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for OpenNTFY-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a6485544046f31febffcd0c6bb0e91195602d25fcbf76152a9424bdc4398ab2
MD5 67c170b640570498e77fdffb31bce611
BLAKE2b-256 f708500e83f9316f3221fbe67f26ee93d44b00afe1502df1dcd61a1d18dd091c

See more details on using hashes here.

Supported by

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