Pycards↑
Introduction↑
pycards is an engine with different frontends to memorize things using flashcards. pycards is written in Python 3 and uses a sqlite database to store all the data. It is starting to get a little usable.
Requirements↑
Todo↑
- Web interface
- Curses interface
- Graphical user interface
Troubleshooting↑
If the program misbehaves at a certain point please make sure before posting an issue that you run it with Python 3.
Documentation↑
Leitner system↑
The Leitner-system is a system of repeating flashcards and works with boxes. Our implementation has 5 boxes. Cards go up a box if you answer them correct and go down in box when you answer them incorrect. A card can not go lower then box 1 nor can it go higher then box 5.
Cards in box 1 are asked every session, cards in box 2 are asked every other session, cards in box 3 are asked once every 3 sessions, cards in box 4 are asked once in every 4 sessions and cards in box 5 are never asked again.
Usage of cli.py
↑
cli.py [globaloptions] {list,load,remove,export,session} [options] [args]
-
globaloptions
-
-h
,--help
Show the help message and exit.
-
-d DATABASE
,--database DATABASE
Specify a custom database file. If not given
~/.pycards/pycards.db
is used. -
-l {INFO,DEBUG,SILENT}
,--loglevel {INFO,DEBUG,SILENT}
Specify a custom log level. If not given
SILENT
is used. -
-f LOGFILE
,--logfile LOGFILE
Specify a log file location. If not given stdout is used.
-
--version
Show version number and exit
-
-
list
:cli.py [globaloptions] list [options] [deckname [deckname ...]]
Show one or more decks from the database.
-
-h
,--help
Show the
list
specific help message and exit. -
-e
,--show-entries
Flag to print all the individual entries
-
deckname
Name of the deck to print. If not given, all decks will be printed.
-
-
load
:cli.py [globaloptions] load [options] deckname [filepath]
Load a deck from a file into a database. The input must be tab separated and two columns. The first column is the question and the second column is the answer.
-
-h
,--help
Show the
load
specific help message and exit. -
deckname
Name of the deck to load the entries in.
-
filepath
Location to load the entries from. If not given stdin is used
-
-
remove
:cli.py [globaloptions] remove [options] deckname [deckname ...]
Remove decks from the database.
-
-h
,--help
Show the
remove
specific help message and exit. -
deckname
Name of the deck to remove.
-
-
export
:cli.py [globaloptions] export [options] deckname [deckname ...]
Export decks from the database.
-
-h
,--help
Show the
export
specific help message and exit. -
-f
,--filepath
Location to export to. If not given stdout is used
-
deckname
Name of the deck to export.
-
-
session
:cli.py [globaloptions] session [options] deckname
Run a session with a deck.
-
-h
,--help
Show the
session
specific help message and exit. -
-l
,--leitner
Use the leitner-system.
-
-r
,--random
Randomize the questions.
-
-i
,--inverse
Inverse the question and the answer.
-
deckname
Name of the deck to start the session with
-
Licence↑
See LICENCE
file.
Changelog↑
- Added statistics table.
- CRTL+C will interrupt but will write statistics first.
- Better command line parser, parser separated from main.
- List, export and remove accept multiple decknames now.
- Better error handling for malformed input files.
- Fancy menu in
README.md
- Leitner system implemented.
- Changed systems so that the system is with flags instead of names. In this way one can do random-leitner-inverse for example.
- All queries parameterized where possible, also changed deck databases to be consisting of ids and ascii only to let names contain every character.
- Updated readme with help.
- Removed the need for a config file.
- Better time representation in
cli.py
while listing decks.
- List deck(s) either with or without all the entries.
- Remove a deck.
- Export to a file.
- Load a deck from tab separated files with two columns.
- Play a session with a deck and different systems: ordered, random.
- Initial version