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
.envfile in the project root directory - Set your API key and preferred LLM provider in the
.envfile:API_KEY=yourSuperSecretKey LLM_PROVIDER=gemini # Options: gemini, openai, anthropic
- Include
.envin your.gitignorefile
Run in the main directory of the project:
python3 -m venv venv
source venv/bin/activateTo install all dependencies:
pip install -r requirements.txtIf you change the dependencies, update requirements.txt:
pip freeze > requirements.txtTo exit the virtual environment:
deactivateRun in the main directory of the project:
conda env create -f environment.yml
conda activate myenvTo install all dependencies:
conda install --file requirements.txtIf you change the dependencies, update environment.yml:
conda env export --name myenv --file environment.ymlTo 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_PATHandTABLE_NAMEvariables in the scripts to customize the database location and table name.