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.
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.
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
pm = PingMe('apikey', 'chatid')
pm.ping('Hello from __Python__!', silent=True)
pingme('Hello from __GNU Octave__!', 'api_key','chatid', 0)
Note: Telegram API keys seem to contain a :
, replace with %
pingme "Hello from __BASH__!" secretkey chatid false