A CLI tool for compiling Anki decks, defined in Markdown
Project description
AnkCompiler
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 buildcompiles decks into.apkgpackages.ankc checkvalidates decks without compiling. It reports problems asfile:line, and can print JSON with--format json.ankc uidadds a[^uid]footnote to any card block that is missing one. It is safe to run more than once. Use--checkfor 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 ::: backplus[^type]: reversed. This makes a card in both directions. - Type in the answer:
question ::: answerplus[^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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69313e79815f74a56c8dd5ae7e7b39a3efeccd68dff730b152de455ad304fc84
|
|
| MD5 |
05a8608b96a438102b36e3f4af92f55d
|
|
| BLAKE2b-256 |
a7588bcaace25b15a84dc98f6733648d78002d84d849e47d172e29b9cd9b9354
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09a786dabad3c8bd20096d9c3ca5b691ea097523686bb35dc23715ed976a12ec
|
|
| MD5 |
f8f8ab8569819373f41d1e9dd9e72dc0
|
|
| BLAKE2b-256 |
d3a8afa9a8fcb383769a157168064930906339ab59c625e2cbf36d8617d6e7fc
|