Skip to content

UnderscorePan/EZFlip

Repository files navigation

EZFlip Flashcard Application

EZFlip is a flashcard application designed to help users create, manage, and learn from custom flashcards. It supports text, images, and videos, and includes gesture control for hands-free operation.

Features

  • Create and manage flashcard sets
  • Add flashcards with text, images, and videos
  • Edit existing flashcard sets
  • Learn mode with gesture control for flipping cards and navigating
  • Simple and intuitive user interface
  • Tooltip assistance for buttons and interactive elements
  • Video and audio synchronization for flashcards with video content
  • Scrollable interface for managing large sets of flashcards

Requirements

  • Python 3.x
  • SQLite3
  • Tkinter
  • Ttkbootstrap
  • PIL (Pillow)
  • OpenCV
  • FFMPEG
  • Pygame
  • Mediapipe

Installation

  1. Clone the repository:

    git clone https://github.com/underscorepan/ezflip.git
    cd ezflip
  2. Install dependencies:

    pip install -r requirements.txt
  3. Install FFMPEG:

    • Download FFMPEG from the official site: FFMPEG Download
    • Add FFMPEG to your system's PATH.
  4. Run the application:

    python main.py
  5. Smoke-test:

    • In Create Set, add a set name plus one card (word + definition, optional media), click Add Word then Save Set.
    • In Select Set, choose the set and click Select Set, then switch to Learning Mode to confirm flip/next/previous work.
    • For video cards, verify playback and audio (FFmpeg must be on PATH).
    • Gesture control requires a webcam; show 1/2/3 fingers to trigger previous/next/flip. Press Q to close the gesture window.

Usage

Creating a New Flashcard Set

  1. Open the application and navigate to the Create Set tab.
  2. Enter the name of the flashcard set.
  3. Add words, definitions, images, and video paths.
  4. Click Add Word to add the flashcard to the set.
  5. Click Save Set to save the flashcard set.

Editing an Existing Flashcard Set

  1. Navigate to the Edit Set tab.
  2. Choose a flashcard set from the dropdown and click Select Set.
  3. View the list of flashcards in the selected set.
  4. To delete a flashcard, select it from the list and click Delete Word.
  5. To add a new flashcard, enter the details in the provided fields and click Add Word.
  6. To update the name of the flashcard set, enter the new name in the New Set Name field and click Update Set Name.

Learning Mode

  1. Navigate to the Select Set tab.
  2. Choose a flashcard set from the dropdown and click Select Set.
  3. Navigate to the Learning Mode tab to start reviewing the flashcards.
  4. Use the Previous and Next buttons to navigate through the flashcards.
  5. Click Flip to view the definition of the current flashcard.
  6. Use hand gestures to control the flashcards:
    • 1 finger: Previous card
    • 2 fingers: Next card
    • 3 fingers: Flip card

Updating and Deleting Sets

  1. To update the name of a flashcard set, enter the new name in the New Set Name field in the Edit Set tab and click Update Set Name.
  2. To delete a flashcard set, select the set from the dropdown in the Select Set tab and click Delete Set.

Gesture Control

The application uses Mediapipe for gesture recognition. To use gesture control:

  1. Ensure your webcam is enabled.
  2. The application will automatically detect hand gestures and perform actions based on the number of fingers shown.
  3. Press Q to turn off the webcam at any moment.

Code Overview

Dependencies

The following libraries and modules are used in the application:

  • Tkinter and Ttkbootstrap for the GUI.
  • SQLite3 for database management.
  • PIL (Pillow) for image processing.
  • OpenCV for video processing.
  • FFMPEG for audio extraction.
  • Pygame for audio playback.
  • Mediapipe for gesture recognition.

Key Components

  • Database Management: Functions to create, update, and delete flashcard sets and cards.
  • Flashcard Display: Functions to display text, images, and videos on flashcards.
  • Gesture Control: Mediapipe integration for gesture-based navigation.
  • Audio-Video Synchronization: Extraction and playback of audio from video files.
  • Scrollable Interface: Canvas and scrollbar implementation to handle large sets of flashcards.
  • Module Layout: Shared helpers now live under ezflip/ (database.py, media.py, gesture.py, tooltips.py) with main.py as the entry point.

Troubleshooting

  • FFmpeg errors or no video/audio: Install FFmpeg and ensure it is on your system PATH.
  • Import errors: Re-run dependency install (pip install -r requirements.txt) with the same Python you use to run main.py.
  • Gesture window issues: Confirm your webcam is available; press Q in the gesture window to close it.

Contributing

If you would like to contribute to EZFlip, please fork the repository and submit a pull request. Contributions are welcome!

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Tkinter and Ttkbootstrap for the GUI
  • Mediapipe for gesture recognition
  • OpenCV for video processing
  • FFMPEG for audio extraction
  • Pygame for audio playback
  • @Grimmlen_ for the Walfie Suisei
  • @Nick-de-Bruin for troubleshooting

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages