yaml2anki
YAML to Anki converter and printable flashcard generator.
Installation
Install using uv:
uv tool install yaml2anki
Install using pip:
pip install yaml2anki
Usage
The program takes up a YAML file of a specific format and does one of the following actions.
input file format
The following is a simple example of a valid YAML file.
deck_name: "Python Basics"
cards:
- front: "What is a `list` in Python?"
back: "An ordered, mutable sequence of elements."
tags: ["python", "data-structures"]
- front: "How do you define a function?"
back: "Using the <code>def</code> keyword."
tags: ["python", "syntax"]
Refer to examples folder for more examples.
apkg
The following command will generate a .apkg file in the current directory.
uvx yaml2anki mydeck.yaml -o mydeck.apkg
import to anki
This option requires installation of AnkiConnect as an add-on. After installation of the add-on, close the app and launch it again so that changes can take effect. While anki instance is running, run the following command
uvx yaml2anki mydeck.yaml -i
The following command will generate a pdf file in the current directory.
uvx yaml2anki mydeck.yaml --pdf output.pdf
The pdf document should have an even number of pages where front and back of flashcards meet each other. After printing the document, you can cut the cards around the dashed lines to get your physical cards. Similarly, the following command generates a printable html document.
uvx yaml2anki mydeck.yaml --html output.html
Metadata
Release files for yaml2anki 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yaml2anki-0.1.4.tar.gz | 48.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yaml2anki-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.7 kB
Release files / yaml2anki-0.1.4.tar.gz
| Download URL | yaml2anki-0.1.4.tar.gz |
|---|---|
| Size | 48.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2f8b786cabd7cd38ec99cc25e02f33342ec104cd784beee0a7076f834fa76ed
|
|
BLAKE2b-256 checksum How to use checksums |
77ac933ad3749cc812da7369499ad52255edd4dde61349859866f891e7668c20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / yaml2anki-0.1.4-py3-none-any.whl
| Download URL | yaml2anki-0.1.4-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
866cd1dee5b5dc524e26ef438c081f2a4c0effa589c7f7d38b59dd8cead20db8
|
|
BLAKE2b-256 checksum How to use checksums |
125a2392537817899b4f93037049131d5bec0b4d01129c9f7cee2f4b9a1428f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|