Skip to main content

Python utilities for creating Anki flashcards. Designed for AI agent integration.

Project description

anki-utils

Python utilities for creating Anki flashcards. Designed for AI agent integration.

Install

pip install anki-utils

Features

  • Card Generation: Create .apkg files for 6 card types (Front-Back, Concept, Cloze, Image, Person, Image Occlusion)
  • Theme System: 4 built-in themes (minimal, rich, bold, ios)
  • Image Occlusion: OCR-based automatic region detection
  • Preview Assets: React components for card preview
  • Agent-Friendly: CLI commands for querying roadmap and changelog

Quick Start

# Generate .apkg from JSON
echo '{"deck_name": "Test", "cards": [...]}' | anki-utils export-apkg --output deck.apkg

# List available themes
anki-utils themes --list

# Get preview template
anki-utils asset preview-template

# Detect occlusion regions in an image
anki-utils occlusion-detect image.jpg --json

For AI Agents

Check development status:

anki-utils roadmap                    # Full roadmap
anki-utils roadmap --section "Current Focus"  # Specific section
anki-utils changelog --latest         # Most recent changes

Documentation

  • docs/VISION.md - Project goals and end state
  • docs/ARCHITECTURE.md - Technical structure
  • docs/AGENT_GUIDE.md - How to work on this codebase

Development

# Clone and install in dev mode
git clone https://github.com/Gilbetrar/anki-package.git
cd anki-package
pip install -e .

# Run tests (once implemented)
pytest

Repository Structure

anki-package/
├── anki_utils/          # Published PyPI package
│   ├── exporter.py      # Core .apkg generation
│   ├── themes.py        # CSS theme definitions
│   ├── occlusion.py     # Image occlusion detection
│   ├── cli.py           # Command-line interface
│   ├── ROADMAP.md       # Development roadmap
│   └── CHANGELOG.md     # Version history
├── docs/                # Agent-focused documentation
├── archive/             # Legacy files (reference only)
└── artifacts/           # Preview templates

License

MIT

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

anki_utils-0.2.0.tar.gz (520.5 kB view details)

Uploaded Source

Built Distribution

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

anki_utils-0.2.0-py3-none-any.whl (53.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anki_utils-0.2.0.tar.gz
  • Upload date:
  • Size: 520.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for anki_utils-0.2.0.tar.gz
Algorithm Hash digest
SHA256 91bf5617d8c19e2be6a4c944027eb99e1b06a63d08094d0a0f86aba26be36725
MD5 832d9f40bd844b7282b0f7b15f9f107b
BLAKE2b-256 f4831fc9a433c02b8f57bbe752611b87d2afda48ea69044e3295d27c4f70c85d

See more details on using hashes here.

Provenance

The following attestation bundles were made for anki_utils-0.2.0.tar.gz:

Publisher: publish.yml on Gilbetrar/anki-package

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: anki_utils-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 53.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for anki_utils-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d72eb516a6c809b75cb740b8d21d2c782f9fccd396c103c56360c2d2364e6e0
MD5 16d695d6eb4f973882fc2f08912a0fad
BLAKE2b-256 66f023969e5e698543ddff431323228992f3bfe5e2b84738d1ba9d22627bd973

See more details on using hashes here.

Provenance

The following attestation bundles were made for anki_utils-0.2.0-py3-none-any.whl:

Publisher: publish.yml on Gilbetrar/anki-package

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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