A command line program to convert markdown files into anki decks.
Markdown anki decks is a simple program to convert markdown files into anki decks.
# The h1 tag is the deck title ## The h2 tags are the questions The markdown content between h2 tags are the answers.
Markdown anki decks uses the question to uniquely identify the card. You can change the card contents without losing your progress on the card. Markdown anki decks can be reimported without creating duplicates.
mdankideck input output to convert the markdown files in the input directory to
apkg files in the output directory.
Markdown anki decks converts all markdown files in an input directory to
apkg files are stored in an output directory.
Create the input directory
Create the output directory
Create a markdown file in the input directory.
<!-- input/deck.md --> # Deck Title ## Card Title card contents. ## Second Card Title card contents 2.
mdankideck input outputto convert the markdown files in the input directory to
apkgfiles in the output directory.
apkgfiles as decks into anki.
Markdown anki decks support images which are stored in the same folder as the markdown file they are referenced by.
![my-image](image.jpg) will work because it is in the same folder as the markdown file.
![my-image](./images/image.jpg) will not work because it is in a different folder than the markdown file.
All images must have unique filenames even if they are stored in different folders.
These are limitations of anki not Markdown anki decks.
All questions in a single deck must be unique. Two questions in the same deck which are identical will have the same id and will lead to a collision.
The markdown files are parsed with commonmark. The resulting html is then parsed with beautifulsoup. Finally the cards are created with genanki. The cli is implemented using typer and the program is packaged using poetry.
Happy to discuss additional features if you open up an issue.
We use commitizen for commits.
poetry run cz commit to make a commit.
poetry run cz bump --check-consistency to update the changelog and create a tag.
Create the build with
Publish the build with
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size markdown_anki_decks-0.1.0-py3-none-any.whl (5.3 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size markdown-anki-decks-0.1.0.tar.gz (5.2 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for markdown_anki_decks-0.1.0-py3-none-any.whl
Hashes for markdown-anki-decks-0.1.0.tar.gz