Skip to main content

A telegram replacement for sendmail.

Project description

sendtelegram

Current version: 0.2.0

A Telegram replacement for sendmail.

sendtelegram uses a Telegram bot to send messages to a specific user. It reads from stdin, splits the input text into messages of at most MAX_MSG_LEN characters (default: 4096) and send them using the Telegram API.

sendtelegram adheres to the 12 factor principles to manage settings.

It requires two environment variables:

  • SENDTELEGRAM_API_TOKEN: the Telegram API token.
  • SENDTELEGRAM_CHAT_ID: id of the chat between the bot and the target user.

Usage

usage: sendtelegram [-h] [-m MAX_MSG_LEN]

optional arguments:
  -h, --help            show this help message and exit
  -m MAX_MSG_LEN, --max-msg-len MAX_MSG_LEN
                        Max number of characters of a Telegram message (default: 4096)

Examples

Sending a text file as a telegram message:

cat README.md | sendtelegram

Author

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

sendtelegram-0.2.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

sendtelegram-0.2.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file sendtelegram-0.2.0.tar.gz.

File metadata

  • Download URL: sendtelegram-0.2.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for sendtelegram-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ef128a3bb0d8c996805c8c7e6dcc2148380f8b087598ec8b36b8d27d831f1ee9
MD5 2da05bcb885f9ef6296728bd40c5d05a
BLAKE2b-256 4b995c4ff8b4dad98b0f2eec7b42f573e323dafcc6da56022868fc18a283103b

See more details on using hashes here.

File details

Details for the file sendtelegram-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sendtelegram-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for sendtelegram-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e489ba5ac83952b3f96c4a80a24e00235a07d54253fb1991df04398f57478330
MD5 65631a3b1db90f7111a1441a4bc0eca2
BLAKE2b-256 79ad687bb872e17565261c41f36fe2b130d217a73fe6b4ffb2bbda27b01f24b3

See more details on using hashes here.

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