Forked from https://github.com/cljoly/telegram-tee
Simple cli tool to send html formatted messages from stdin to any Telegram chat, through a bot.
First, install the tool with
go install github.com/lukas016/telegram-client
Then, you need to control a bot. Set the environment variable TLGCLI_TOKEN
to
the token of the bot that will write stdin to a chat for you. You may want to create a new bot or use an existing one.
Simple input
echo "<strong>Hi</strong>" | telegram-client <chatID> ...
Multiline input
printf "<string>Hi</strong>\nHow are you?" | telegram-client <chatID> ...
or
telegram-client <chatID> ... << EOF
<string>Hi</strong>
How are you?
EOF
You can even send to several chatID at the same time.