Spaced repetition system bot for Telegram @memorizationsys_bot.
Fork of Memorization Bot.
Things added:
- If you manage to successfully write the back of the card, it will be interpreted as 'recalled' (or if your reply does not match perfectly, 'show back').
- Always show the total number of cards in deck (even when there are no cards to review).
- APIs!
- Webapp!
Note: you'll need to have a public accessible HTTPS gateway for the Telegram API.
Exposing the HTTP server as-is to the Telegram servers will NOT work.
For example, you can use something like ngrok http 8000.
- Copy
.env.sampleto.envand follow the instructions. docker-compose up --build.- You'll have your bot server listening on port 8000.
- Access the database with
docker-compose exec db psql -U postgres.
Note: you'll need to have a public accessible HTTPS gateway for the Telegram API.
Exposing the HTTP server as-is to the Telegram servers will NOT work.
For example, you can use something like ngrok http 8000.
You might want to use direnv to ease the environment configuration process.
- Copy
.env.sampleto.envand follow the instructions. make depsto download go/js dependencies.make runormake build && make server_runto compile and run the bot on port 8000.
- You'll need the Heroku Postgres add-on.
- Initialize the database:
{ cat db/db.sql; cat db/functions.sql; } | heroku pg:psql - Take a look at
.env.sampleand do yourheroku config:setaccordingly. - Use the scheduler add-on to run
wake-dogit every morning. It will wake up the bot, so that you'll have your rehearsal, even with free dynos.
You can download a copy of the remote database with:
cd db
heroku pg:backups:capture
heroku pg:backups:downloadThen import locally with:
docker-compose exec db pg_restore --verbose --clean --no-acl --no-owner -h localhost -U postgres -d postgres /docker-entrypoint-initdb.d/latest.dumpGOOS=linux GOARCH=amd64 make archive