3 releases
Uses new Rust 2024
0.1.2 | May 15, 2025 |
---|---|
0.1.1 | May 3, 2025 |
0.1.0 | May 2, 2025 |
#466 in Text processing
456 downloads per month
8KB
131 lines
ankinase
A parser which generates Anki cards from CommonMark.
Installation
cargo install ankinase
See ankinase --help
for (sparse) usage information.
Overview
The following Markdown file:
# biology chemistry
What are the __two__ B12-dependent enzymes present in humans?
&
Methylmalonyl-CoA mutase and methionine synthase depend on _which_ cofactor?
Which type of enzyme catalyzes phosphorylation?
^
Kinases.
\\(\ce{ATP + H2O <=> ADP + {{c1::P_i}}}\\).
would produce the following Anki card file:
#separator:Tab
#html:true
#tags:biology chemistry
#notetype column:1
Basic (and reversed card) <p>What are the <strong>two</strong> B12-dependent enzymes present in humans?</p> <p>Methylmalonyl-CoA mutase and methionine synthase depend on <em>which</em> cofactor?</p>
Basic <p>Which type of enzyme catalyzes phosphorylation?</p> <p>Kinases.</p>
Cloze <p>\(\ce{ATP + H2O <=> ADP + {{c1::P_i}}}\).</p>
- Tags which apply to each note in a file may be specified in the first line,
which must begin with
#
. Separate tags with spaces. - Notes are separated with two or more blank lines. The first note of a file does not need to be separated from the tags, if the latter are present.
- For basic (i.e. not reversible) notes, separate fields with a line containing
only
^
. - For reversible notes, separate fields with a line containing only
&
. - Notes with cloze deletion must not use a field separator.
- Fields are written via CommonMark, and can contain MathJax per Anki (though math-mode delimiters must be escaped with an additional backslash).
Images (via CommonMark syntax) should work, but you must move the images to the appropriate folder.
Known Issues
- Code blocks will lose linebreaks when converted.
Dependencies
~6.5–8.5MB
~153K SLoC