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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yaml2anki-0.1.4.tar.gz.
File metadata
- Download URL: yaml2anki-0.1.4.tar.gz
- Upload date:
- Size: 48.9 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2f8b786cabd7cd38ec99cc25e02f33342ec104cd784beee0a7076f834fa76ed
|
|
| MD5 |
faed0ee1b76bb2ff9c62aec537a387b8
|
|
| BLAKE2b-256 |
77ac933ad3749cc812da7369499ad52255edd4dde61349859866f891e7668c20
|
File details
Details for the file yaml2anki-0.1.4-py3-none-any.whl.
File metadata
- Download URL: yaml2anki-0.1.4-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
866cd1dee5b5dc524e26ef438c081f2a4c0effa589c7f7d38b59dd8cead20db8
|
|
| MD5 |
a8e11d0524ccba5060df60ae7c8e9bae
|
|
| BLAKE2b-256 |
125a2392537817899b4f93037049131d5bec0b4d01129c9f7cee2f4b9a1428f4
|