Parses a Markdown file, or a directory of Markdown files, into an Anki .apkg deck.
Expects a specific format:
- H2 (##) headings are treated as the "Front" of the card.
- All content following an H2 until the next H2 (or end of file) is treated as the "Back" of the card.
- Content before the first H2 (like an H1) is ignored.
- Recursively finds all .md or .markdown files.
- Creates a nested Anki deck structure matching the directory structure.
usage: main.py [-h] [-o OUTPUT] [-n NAME] input_path
Markdown to Anki Deck Generator
positional arguments:
input_path Path to the markdown file or directory
options:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
Path for the output Anki deck (.apkg).
(default: <input_name>.apkg)
-n NAME, --name NAME Name of the root Anki deck.
(default: input file/dir name)
Example usages:
# Process a single file
./main.py notes.md -n "My Notes"
# Process a directory
./main.py ./my_study_files/ -n "Study Deck" -o "study.apkg"Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.