civics-quiz-bot/README.md
2023-01-29 09:58:00 -07:00

1.8 KiB

Civics Quiz Bot

This is a small project I put together to help my wife study for her US Civics Exam. It's essentially a flashcards app, with the following features:

  • automatic question updates
  • spaced repetition
  • scheduled reminders

Usage

Prerequisites

Building

Gradle

The project uses gradle. You can build a JAR file with the following command:

./gradlew shadowJar

You can then run it with the following command:

java -jar build/libs/civics-quiz-bot.jar

Docker

There is also a Dockerfile included. If you'd like to use that instead, you can run the following command:

docker build -t civics-quiz-bot .

You can then run it with the following command:

docker run civics-quiz-bot

Configuration

Regardless of how you build the JAR, there are a few configuration options that need to be set via environment variables.

Environment Variable Default Value Description
TELEGRAM_TOKEN Telegram bot token
CIVICS_DB_HOST localhost Hostname for PostgreSQL server
CIVICS_DB_PORT 5432 Port for PostgreSQL server
CIVICS_DB_USER postgres Username for PostgreSQL server
CIVICS_DB_PASSWORD postgres Password for PostgreSQL server