Skip to content

Send a notification via a Telegram bot - in Python, Bash, Octave/Matlab

License

Notifications You must be signed in to change notification settings

jkschluesener/pingme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PingMe - A simple Telegram notifier

Simple functions / classes for Matlab (GNU Octave), Python and Bash to send markdown-formatted, optionally silent, messages via a telegram bot.
Intended to inform you about program or system states / crashes, etc.

Telegram Setup

Instructions on how to create a Telegram Bot and get your API key, as well as a message ID can be found e.g. here.

Installation

The scripts are small with minimal dependencies.

Python requires the requests package, Matlab (GNU Octave) and Bash require curl.

To intall, just drop the file into the program's PATH, or copy the function into your script

Usage

Python

pm = PingMe('apikey', 'chatid')
pm.ping('Hello from __Python__!', silent=True)

Matlab / GNU Octave

pingme('Hello from __GNU Octave__!', 'api_key','chatid', 0)

Bash

Note: Telegram API keys seem to contain a :, replace with %

pingme "Hello from __BASH__!" secretkey chatid false

About

Send a notification via a Telegram bot - in Python, Bash, Octave/Matlab

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published