A modern flashcard application written in Python with both graphical (GUI) and command-line (CLI) interfaces. Perfect for language learning, exam preparation, or any type of study that benefits from spaced repetition and active recall.
- Create flashcards manually through intuitive interfaces
- Load flashcards from JSON files for easy sharing and backup
- Take randomized quizzes with instant feedback
- Case-insensitive answer checking with smart normalization
- Save and load decks for persistent storage
- Real-time progress tracking during quizzes
- Modern three-panel interface with professional design
- Interactive quiz area with visual feedback (✅❌)
- Drag-and-drop file loading via file browser
- Card management with scrollable list and removal options
- Multi-line text support for complex questions and answers
- Keyboard shortcuts for efficient navigation
- Score tracking with encouraging feedback messages
- Responsive design that adapts to window resizing
- Terminal-based interface for command-line enthusiasts
- Simple menu system for quick navigation
- Batch card creation with continuous input
- Lightweight and fast execution
flashcard-app/
├── bin/
│ └── main.py # Entry point with GUI/CLI selection
├── src/
│ ├── flashcard.py # Flashcard class definition
│ ├── deck.py # Deck management and card operations
│ ├── quiz.py # Quiz logic and scoring system
│ └── flashcard_gui.py # GUI implementation using Tkinter
├── italian_flashcards.json # Sample flashcard deck
├── README.md # This file
└── .gitignore # Git ignore rules
- Python 3.7+ installed on your system
- Tkinter (usually included with Python installations)
-
Clone the repository:
git clone https://github.com/alex-lisi/flashcard-app.git cd flashcard-app -
Run the application:
python main.py
Default (Interactive Choice):
python main.pyPrompts you to choose between GUI and CLI
GUI Mode (Recommended):
python main.py --guiCLI Mode:
python main.py --cli-
Adding Cards:
- Click "Add Card Manually" for the card creation dialog
- Use multi-line text areas for questions and answers
- Press "Save Card" to add to your deck
-
Loading Existing Decks:
- Click "Load from JSON" to open file browser
- Select your JSON file (try
italian_flashcards.json) - Cards will be loaded and displayed in the list
-
Taking Quizzes:
- Click "Start Quiz" when you have cards in your deck
- Type your answer and press Enter or click "Submit Answer"
- Get instant feedback with correct/incorrect indicators
- View your final score with encouraging messages
-
Managing Your Deck:
- View all cards in the scrollable list on the right
- Select and remove unwanted cards
- Save your deck to JSON for future use
- Clear the entire deck when needed
- Choose option 1 to create cards manually
- Choose option 2 to load from a JSON file
- Follow the prompts to add cards or specify file paths
- Take the quiz when your deck is ready
The repository includes italian_flashcards.json with Italian language learning cards. You can create your own JSON files using this format:
[
{
"question": "Come si dice 'to improve' in italiano?",
"answer": "migliorare"
},
{
"question": "Qual è il contrario di 'veloce'?",
"answer": "lento"
}
]- Language Learning: Vocabulary, phrases, and grammar rules
- Exam Preparation: Key concepts, formulas, and definitions
- General Knowledge: Facts, dates, and trivia
- Professional Development: Technical terms and procedures
- Academic Study: Course material and review sessions
- Python 3.7+ - Core language
- Tkinter - GUI framework (included with Python)
- JSON - Data storage format
- Random - Quiz randomization
Flashcard- Individual card with question/answer pairsDeck- Collection of flashcards with management methodsQuiz- Quiz logic, scoring, and answer validationFlashcardGUI- Complete GUI implementation
The app uses smart answer checking that:
- Ignores case differences
- Trims whitespace
- Removes trailing punctuation (.?!)
- Ensures fair and flexible matching
- Spaced repetition algorithm for optimized learning
- Category/tag system for better organization
- Statistics tracking and learning analytics
- Export capabilities (PDF, CSV formats)
- Multi-language support for interface
- Cloud sync for cross-device access
- Audio support for pronunciation practice
Pull requests and suggestions are welcome! Here's how to contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and test thoroughly
- Commit your changes:
git commit -m 'Add feature description' - Push to the branch:
git push origin feature-name - Open a Pull Request
# Clone your fork
git clone https://github.com/your-username/flashcard-app.git
cd flashcard-app
# Test the application
python main.py --gui
python main.py --cliThis project is open source and available under the MIT License.
Alex Lisi
- GitHub: @alex-lisi
- Feel free to reach out with questions or suggestions!
- Thanks to the Python community for excellent documentation
- Inspired by traditional flashcard study methods
- Built with modern software development best practices
Happy studying! 🎓