Skip to content

ebisu-flashcards/flashcards-cli

Repository files navigation

Flashcards CLI

Very basic command-line flashcards application, based on flashcards-core.

CodeQL Unit Tests Coverage Status License: GPL v3 Code on: GitHub Code style: black


Introduction

Flashcards & SRS (Spaced Repetition Software)

Flashcards are a great way to memorize large amount of facts, for example a foreign language vocabulary, the world's flags, some trivia, bird songs, your new colleagues names, or any other long list of item pairs, be that text, images, or sounds.

What makes flashcards so powerful is the possibility to review them as soon as they start to get forgotten thanks to spaced repetition algorithms (SRS), which are designed to propose you study session of optimal lenght and timing, so that you can study the least while achieving the most. Some popular algorithms include Anki's SM2, SuperMemo's algorithms, Duolingo's algorithm, and other simpler ones. Flashcards supports also very trivial schedulers like "random order" or "last seen first", etc. If you know how to write Python, you can also write your own scheduler and send it to us to add it to the library! See the "Contribute" section below to understand how to do it.

SRS algorithms have a noticeable impact on the short term learning rate, but their greatest benefits are seen on the long term.

References


Usage

Here is an example of how to create a deck, a couple of cards, and how to study them.

video example of a study session

Note that for the time being, only a small subset of the features of flashcards-core is used: for example there is no way to add tags to any entity, to add context to question and answers, to use any SRS algorithm except for random, and no way to configure the algorithm parameters either. On the other end, this application is extremely small, so feel free to peek into the code and send a patch with the features you wish to add. Or at least open an issues for other volunteer to be aware of your interest.

Install

Flashcards CLI can be installed from this repo as follows:

> python3 -m venv venv
> source venv/bin/activate
> pip install -e flashcards_cli @ git+https://github.com/ebisu-flashcards/flashcards-cli.git#egg=flashcards_cli
> flashcards

Or from PyPi (not yet, soon!):

> python3 -m venv venv
> source venv/bin/activate
> pip install flashcards-cli

Versioning

This library is in development and might still experience radical changes from version to version. Do not assume backwards compatibility between minor versions until we hit version 1.0.


Contribute

Contributions are really welcome here! To get started, install an editable version of this package:

> git clone https://github.com/ebisu-flashcards/flashcards-cli.git
> cd flashcards-cli
> python3 -m venv venv
> source venv/bin/activate
> pip install -e .[dev]
> pre-commit install

... do some changes ...

> pytest

The pre-commit hook runs Black and Flake8 with fairly standard setups.

Do not send a PR if these checks, or the tests, are failing, but rather ask for help.


Contacts

Soon...

Contributors

GitHub Contributors Image