Skip to content

dolezvo1/cvut-fit-anki

Repository files navigation

CVUT-FIT-Anki

Anki cards for ČVUT FIT SZZ in a versionable format (HTML).

Tools

  • generate.py is used to generate an .apkg file from the source files. For example to generate an .apkg file from all source files in the src/ directory, run:

    pip install beautifulsoup4 genanki
    python generator.py --all --output out.apkg
    

    Note that this will not regenerate guids, meaning that previous versions of the cards will be overwritten when the resulting Anki package is imported.

  • check_ids.py is used to check whether all IDs used in source files are unique. When this is not the case, the offending ID and files are printed. Usage:

    python check_ids.py src/
    
  • tsv_to_html.py generates HTML from tsv files generated by Anki. This is useful when converting existing Anki decks.

  • replace_by_random.py replaces all occurences of a pattern in a file with randomly generated integers. This is useful when creating new deck files from scratch. Usage:

    python replace_by_random.py TARGET_FILE_PATH "idreplacementdummy"
    

Deck structure

Decks are stored as !deck.html files. All other files in a given directory are automatically included as the note resources.

A deck node has three attributes: id, data-deckname and data-deckslug (which is used as a prefix for the note sorting field). For example:

<div class="deck" id="1446238097" data-deckname="NI-PIS::NI-PIS-02" data-deckslug="NI-PIS-02">
    ...notes here...
</div>

A note node has two attributes: id and data-notetype (the id of the note type). For example:

<div class="note" id="1834387779" data-notetype="1708237251">
    ...fields here...
</div>

A field node is simply a div element with class="field" which is pasted into the note field verbatim (including the outer div tags).

For an example deck file, see NI-EXAMPLE deck.

Contributing

The cards are not perfect by any means and many improvements could be made. Forks and PRs are very welcome.

Copyright

Provided for educational purposes only. Copyright belongs to the respective authors. The cards were sourced from various sources, most notably the official course materials, the stellar FIT ČVUT Anki decks by Adam Škoda and various Anki decks found on various servers.

About

Anki cards for ČVUT FIT SZZ in a versionable format (HTML)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors