Skip to content

A flashcard application for studying and memorization, similar to Anki. It helps users learn by spaced repetition and active recall.

Notifications You must be signed in to change notification settings

Samster101/FlashCards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flashcard Application

A modular, efficient Anki-style flashcard application built with Python and Tkinter.

This follows a modular design with clear separation of concerns:

Module Structure

AnkiCards/ ├── main.py # Entry point ├── models.py # Data models (Card) ├── loader.py # File loading logic ├── session.py # Session management ├── utils.py # Utility functions (normalization) └── ui/ ├── init.py ├── app.py # Main application window └── components.py # Reusable UI components

Principles Used:

  1. Separation - Each module has a single, well-defined responsibility
  2. Lazy Loading - Pandas is only loaded when needed (not at import time)
  3. Caching - Translation tables and other expensive operations are cached
  4. Reuseability - UI components are modular and reusable
  5. Data - Cards are normalized at creation time
  6. Efficiency - Uses sets for O(1) lookups, optimized list operations

Key Optimizations

  • Pandas DataFrame is only created when needed
  • Punctuation translation table is cached globally
  • Uses set operations for group filtering
  • Handles both JSON arrays and JSONL formats efficiently
  • Reduces redundant code and improves maintainability

How to use

python main.py [deck.json]

Or use the original entry point (backwards compatible):

python anki.py [deck.json]

Current - Features

  • Load cards from JSON or JSONL files
  • Group-based filtering
  • Practice modes (type current side, type translation)
  • Keyboard shortcuts (Space to flip, Arrow keys to navigate)
  • Progress tracking
  • Smart text normalization for answer checking

About

A flashcard application for studying and memorization, similar to Anki. It helps users learn by spaced repetition and active recall.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages