Give me your highlighted book before you go to bed, and you'll have fresh, finely processed flashcards by the morning!
- 🔍 Extracts highlights from PDF files
- 📝 Generates context around highlights
- 🤖 Creates flashcards using LLMs (Gemini, OpenaI, Anthropic)
- 📥 Exports flashcards to Anki
- 🔄 Automatically updates flashcards when PDFs are moved or renamed
- 💾 Stores highlights in a SQLite database to avoid duplicates
- Create a
.env
file in the project root directory - Set your API key and preferred LLM provider in the
.env
file:API_KEY=yourSuperSecretKey LLM_PROVIDER=gemini # Options: gemini, openai, anthropic
- Include
.env
in your.gitignore
file
Run in the main directory of the project:
python3 -m venv venv
source venv/bin/activate
To install all dependencies:
pip install -r requirements.txt
If you change the dependencies, update requirements.txt
:
pip freeze > requirements.txt
To exit the virtual environment:
deactivate
Run in the main directory of the project:
conda env create -f environment.yml
conda activate myenv
To install all dependencies:
conda install --file requirements.txt
If you change the dependencies, update environment.yml
:
conda env export --name myenv --file environment.yml
To exit the conda environment:
conda deactivate
- Ensure your virtual environment is activated and dependencies are installed.
- Run the main script with your PDF file:
python main.py your_highlighted_book.pdf
- Ensure that the directory you want to monitor has the necessary read/write permissions.
- You can modify the
DATABASE_PATH
andTABLE_NAME
variables in the scripts to customize the database location and table name.