Skip to content

tetafro/dutch-bot

Repository files navigation

dutch

Codecov Go Report CI

A small bot for learning Dutch. It generates grammar rules explanations for a random topic (using ChatGPT API). Texts are posted to a Telegram channel.

Build and run

Create a bot and get Telegram API token from the bot called @botfather (free).

Get OpenAI API key here (paid).

Copy and populate config

cp config.example.yaml config.yaml

Build

make build

Run in a loop on schedule, results are published to Telegram

./bin/dutch-bot

Generate text and print results without publishing to Telegram

./bin/dutch-bot -debug -once topic

Encrypted config

Encrypt

echo "password" > .vault_pass.txt
ansible-vault encrypt \
    --output config.yaml.vault \
    config.yaml

Edit

EDITOR='code --wait' \
ansible-vault edit config.yaml.vault

Deploy

Normally deploy is done by Github actions.

Manual deploy

SSH_SERVER=10.0.0.1:22 \
SSH_USER=user \
make deploy

About

Telegram bot for learning Dutch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages