flashidian is a command-line tool that converts markdown notes into tab-delimited flashcards using Google Gemini 2.0 flash. The flashcards are saved in a text file, ready to import into applications like Anki.
- Parses markdown notes from a specified folder.
- Extracts important concepts and generates question-answer flashcards.
- Outputs flashcards in a tab-delimited format.
- Saves the flashcards to a
.txt
file.
- Python 3.12 or higher
- Google API key
- Required Python packages:
python-dotenv
google-genai
(or the appropriate library for the Google API)
- Clone this repository or download
script.py
: - Download required packages with UV
- Set up your .env file to store the Google API key:
Run the script using the following syntax:
uv run script.py <folder_path> [--env <path_to_env>] [--output <output_file>]
- folder (required): Path to the folder containing markdown files to process
- --env (optional): Path to the .env file containing the Google API key. Defaults to .env in the current directory.
- --output (optional): Path to save the generated flashcards file. Defaults to flashcards.txt in the current directory.
- Open anki and click "Import File"
- Navigate to flashcards.txt and import it