A feature-rich, interactive C++ command-line application for creating, managing, and studying flashcards directly in your terminal. Designed for active recall, FlashTerm requires you to type answers manually to maximize memorization, and packages standard spaced repetition principles into a sleek terminal interface.
- 🧠 Spaced Repetition (Leitner System): Flashcards are sorted into 5 boxes. Answering correctly promotes a card to the next box (up to Box 5); answering incorrectly demotes it back to Box 1. You can choose to review specific boxes or prioritize weaker boxes first.
- 🏷️ Tag System & Interactive Filtering: Tag cards (e.g.,
cpp; memory) to filter reviews. Supports tag sorting and an interactive selection menu where you can choose tags by number or name. - ✍️ Typo Tolerance & Manual Override: Uses Levenshtein Distance to check how close your typed answer is to the correct one. If you make a minor typo, FlashTerm will show a warning and let you override it (mark it as correct).
- 🗃️ Custom Decks via CLI: Load, edit, and save distinct flashcard decks by passing the filename as a command-line argument:
(Defaults to
./FlashTerm vocabulary.txt
flashcards.txtif no argument is provided). - 📊 Deck Statistics Dashboard: View detailed metrics about your progress:
- Overall success rates and review counts.
- A box-by-box breakdown of card mastery with visual ASCII progress bars.
- Automatic flagging of your "Hardest Card to Remember."
- 🛡️ Robust CSV Parser: Fully supports double-quotes so questions/answers can contain commas without corrupting the file database.
- 🌀 EOF and Pipe Safety: Handles closed input streams gracefully. If you run the program non-interactively or pipe commands, it will auto-save your deck and exit cleanly rather than looping.
- A C++ compiler supporting C++17 (e.g.,
g++orclang++) makebuild utility
Compile the application using the provided Makefile:
makeThis creates an executable file named FlashTerm.
To launch with the default deck (flashcards.txt):
./FlashTermTo launch with a custom deck file:
./FlashTerm path/to/my_deck.txtWhen running FlashTerm, you can navigate using the main menu options:
- Add flashcard: Prompts for a question, answer, and semicolon-separated tags.
- Review flashcards: Start a review session. You can choose to review:
- ALL cards (shuffled)
- By TAGS (select tags interactively)
- DIFFICULT cards (where Incorrect count > Correct count)
- By LEITNER BOX (focus on weaker cards first)
- Manage flashcards: List all cards with their current Leitner box, edit questions/answers/tags, or delete cards.
- Display progress: View overall deck statistics, Leitner box distribution, hardest card, and card-by-card correctness rates.
- Import flashcards: Append flashcards from a
.csvfile. - Export flashcards: Save the current deck to a clean
.csvfile. - List unique Tags: View all unique tags across your deck sorted alphabetically, along with card counts for each.
- Save and exit: Saves all changes and exits safely.
Contributions are welcome! Please feel free to open issues or submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.