Skip to main content

md2ankicard

Convert Markdown notes (with images) into Anki decks.

md2ankicard is a command-line tool to batch-convert Markdown files into Anki .apkg file, preserving images and formatting.

✨ Features

  • 📄 Converts each .md file into an Anki note (card).
  • 🖼️ Automatically includes images referenced in Markdown.
  • 🔍 Optional --grep to filter files by keyword (e.g. by a tag).
  • 🧠 Uses the Markdown filename as the front (question) and content as the back (answer).
  • 🗃️ Outputs a standard .apkg file ready to import into Anki.

📦 Installation

pip install md2ankicard

Or with Poetry (for development):

git clone https://github.com/andrewromanenco/md2ankicard.git
cd md2ankicard
poetry install

🚀 Usage

md2ankicard <markdown_folder> <output.apkg> "<deck name>" [--grep <pattern>] [--verbose]

or if run from source code

poetry run md2ankicard PathToFilder FileName.apkg DeckName -v --grep '#SomeTag'

Examples

Convert all Markdown files in the 'notes' folder to an Anki deck

md2ankicard ./notes study.apkg "Study Notes"

Only include files that mention 'python'

md2ankicard ./notes code.apkg "Code Review" --grep "python"

Show detailed output during conversion

md2ankicard ./docs docs.apkg "Documentation" --verbose

🧠 How It Works

  • Each .md file becomes one Anki card.
  • The file name (without extension) becomes the front of the card.
  • The rendered Markdown (including images) becomes the back.
  • Images are automatically detected and embedded in the .apkg file.

📝 License

This project is licensed under the MIT License.

Metadata

Release files for md2ankicard 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for md2ankicard 0.1.0
File Size Uploaded Provenance
md2ankicard-0.1.0.tar.gz 6.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for md2ankicard 0.1.0
File Interpreter ABI Platform
md2ankicard-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.4 kB

Release files / md2ankicard-0.1.0.tar.gz

Download URL md2ankicard-0.1.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8466f6f29183c5973693b5d46d04c665ded424fd3a9f5d42ecd026b91482e52a
BLAKE2b-256 checksum
How to use checksums
e699702158829fdb2161405d664d9e7204befbe3acf1293e4e5084a70ae174aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.13.2 Linux/6.12.5-linuxkit

Release files / md2ankicard-0.1.0-py3-none-any.whl

Download URL md2ankicard-0.1.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
727a73cb4b32b132923938183feb825c5e18a7c1262f589f39f9328193d01e07
BLAKE2b-256 checksum
How to use checksums
fc40aaad1339cbce9af9074b5c9ae48092acdd7f191b1eece2c725c92c272ec9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.13.2 Linux/6.12.5-linuxkit

Security for md2ankicard 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page