Skip to main content

yaml2anki

YAML to Anki converter and printable flashcard generator.

Usage

The program takes up a YAML file of a specific format and does one of the following actions.

  1. Create .apkg file
  2. Import to anki via AnkiConnect
  3. Generate a printable document of flashcards

apkg

The following command will generate a .apkg file in the current directory.

python -m 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

python -m yaml2anki mydeck.yaml -i

print

The following command will generate a pdf file in the current directory.

python -m 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.

python -m yaml2anki mydeck.yaml --html output.html

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yaml2anki-0.1.0.tar.gz (47.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yaml2anki-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file yaml2anki-0.1.0.tar.gz.

File metadata

  • Download URL: yaml2anki-0.1.0.tar.gz
  • Upload date:
  • Size: 47.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yaml2anki-0.1.0.tar.gz
Algorithm Hash digest
SHA256 644a3790e72ca82f224ddfd980421daa0f60ff6611867732a466bc73a0437a44
MD5 1642fa24c5287239f75042deacd06c37
BLAKE2b-256 612e09da038ff87fd3c76ef8ccb6701814dec9b913d35c74e5848b9957e517b5

See more details on using hashes here.

File details

Details for the file yaml2anki-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: yaml2anki-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yaml2anki-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99ad9d77fd09c05e22d0ecd2069673200c27e6d82b99f3c053e37ae451a96ac0
MD5 6b9f65524ce401bd24e107c4a842a6ad
BLAKE2b-256 8b751f0b41d7821276ce8d4bcf0ca00e2154777ae1829d151076d174753875c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page