Skip to content

Kivy App for desktop for quick generation of personalized language flash cards for Anki containing: Image, audio, example, synonym - antonym, definition and more! The interface is built with the material-design-inspired kivymd.

License

Notifications You must be signed in to change notification settings

david-fischer/Anki_CardGen

Repository files navigation






AnkiCardGen

Code style: black LICENSE: MIT Version Documentation Status

Python Kivy App for desktop for quick generation of personalized language flash cards for Anki containing: Image, audio, example, synonym - antonym, definition and more! The interface is built w ith the material-design-inspired KivyMD. The project is not affiliated with Anki.

**:warning: Currently under heavy development.**​

Currently supported languages:

  • Brazilian Portuguese
  • English

Some settings have to be applied via the config.ini (located in linux under ~/.config/acg/version/config.ini)

Screenshots

   

More screenshots    
Example Cards

casa

comecar

convite

❓ About

Anki is a powerful tool for reviewing flash cards, in particular for learning languages.

Having flash cards with multiple cues (image, audio, example sentence, ...) is beneficial for memorization but one does not want to spend a large amount of time on the creation of the cards. This project aims to provide a solution to this process. The app automatically downloads and processes data for a given word in the target language and offers the user a choice of various options for the content of the card.

This allows quick generation of high-quality, personalized cards.

⚡ Quick Start

You can find the application packaged with PyInstaller for Linux and soon also for Windows.

🏗 To Do

  • change of languages
  • save both lemma and word
  • filter words (word_state: not_wanted)
  • Choose Anki template by dropdown menu in settings
  • Dark mode for anki templates
  • use __name__ as default for cookbook.register()
  • change deck names for exported apkg
  • add other spacy models (only important for pyinstaller)
  • edit images
  • make target language part of template class (right now it is a config value)
  • consistency of errors with parsers
  • update github action
  • generalize Dockerfile

🚧 Installation

For use

  • Setup new virtual environment with python 3.9, e.g. with conda
conda create -n "<environment_name>" python==3.9
conda activate <environment_name>
pip install git+https://github.com/david-fischer/Anki_CardGen.git

For Development

conda create -n "<environment_name>" python==3.9
pip install poetry
git clone https://github.com/david-fischer/Anki_CardGen.git
cd Anki_CardGen
poetry install --no-root
pre-commit install

You can now start the app from the repo folder with

python -m acg.main

🔧 Usage

Following Quickstart

If you downloaded the packaged application, unzip the folder, make AnkiCardGen (or AnkiCardGen.exe) executable and start it by double-clicking it or by calling it from the terminal.

Following Installation

After installation you should be able to start the app from the command line:

acg

🚀 Contribute

Parsers:

  • make a new file in the acg/parsers folder

  • Inherit from parsers.base_parsers.AsyncParser

  • import in parsers/_init_.py and register it

  • use it in template.py

📦 Dependencies

  • appdirs - A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".
  • titlecase - Python Port of John Gruber's titlecase.pl
  • attrs - Classes Without Boilerplate
  • beautifulsoup4 - Screen-scraping library
  • bidict - The bidirectional mapping library for Python.
  • certifi - Python package for providing Mozilla's CA Bundle.
  • genanki - Generate Anki decks programmatically
  • kivymd - Set of widgets for Kivy inspired by Google's Material Design
  • googletrans - Free Google Translate API for Python. Translates totally free of charge.
  • Kivy - A software library for rapid development of hardware-accelerated multitouch applications.
  • lxml - Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.
  • pandas - Powerful data structures for data analysis, time series, and statistics
  • Pillow - Python Imaging Library (Fork)
  • pony - Pony Object-Relational Mapper
  • requests - Python HTTP for Humans.
  • spacy - Industrial-strength Natural Language Processing (NLP) in Python
  • toolz - List processing tools and functional utilities
  • Unidecode - ASCII transliterations of Unicode text
  • aiohttp - Async http client/server framework (asyncio)
  • toml - Python Library for Tom's Obvious, Minimal Language

About

Kivy App for desktop for quick generation of personalized language flash cards for Anki containing: Image, audio, example, synonym - antonym, definition and more! The interface is built with the material-design-inspired kivymd.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages