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.
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
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
Normally deploy is done by Github actions.
Manual deploy
SSH_SERVER=10.0.0.1:22 \
SSH_USER=user \
make deploy