Skip to main content

A CLI tool for compiling Anki decks, defined in Markdown

Project description

AnkCompiler

coverage

A CLI tool for compiling Anki decks, defined in Markdown.

Installation

Run pip install ankcompiler

Usage

Run ankc --help for usage information.

Main commands:

  • ankc build compiles decks into .apkg packages.
  • ankc check validates decks without compiling. It reports problems as file:line, and can print JSON with --format json.
  • ankc uid adds a [^uid] footnote to any card block that is missing one. It is safe to run more than once. Use --check for a dry run. It will not touch files with uncommitted git changes unless you pass --force.

Examples

See examples/example.md for a deck with every note type, tags, and math.

Note types

  • Question and answer: front ::: back. Found automatically.
  • Cloze: {{c1:: ...}}. Found automatically.
  • Basic and reversed: front ::: back plus [^type]: reversed. This makes a card in both directions.
  • Type in the answer: question ::: answer plus [^type]: type-in.

Reversed and type-in cards use the same ::: syntax as a question and answer card. So you name them with a [^type] footnote next to the [^uid].

Math

Write inline math as $...$ and block math as $$...$$. Anki renders it with MathJax. To show a real dollar sign, write \$.

Credits

Inspiration taken from lukesmurry

Project details


Download files

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

Source Distribution

ankcompiler-0.2.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

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

ankcompiler-0.2.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file ankcompiler-0.2.0.tar.gz.

File metadata

  • Download URL: ankcompiler-0.2.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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

Hashes for ankcompiler-0.2.0.tar.gz
Algorithm Hash digest
SHA256 69313e79815f74a56c8dd5ae7e7b39a3efeccd68dff730b152de455ad304fc84
MD5 05a8608b96a438102b36e3f4af92f55d
BLAKE2b-256 a7588bcaace25b15a84dc98f6733648d78002d84d849e47d172e29b9cd9b9354

See more details on using hashes here.

File details

Details for the file ankcompiler-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ankcompiler-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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

Hashes for ankcompiler-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09a786dabad3c8bd20096d9c3ca5b691ea097523686bb35dc23715ed976a12ec
MD5 f8f8ab8569819373f41d1e9dd9e72dc0
BLAKE2b-256 d3a8afa9a8fcb383769a157168064930906339ab59c625e2cbf36d8617d6e7fc

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