Metadata-Version: 2.4
Name: anki-utils
Version: 0.2.2
Summary: Python utilities for creating Anki flashcards. Designed for AI agent integration.
License: MIT
Project-URL: Homepage, https://pypi.org/project/anki-utils/
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: genanki
Requires-Dist: Pillow
Requires-Dist: pytesseract
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"

# anki-utils

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

## Install

```bash
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)
- **Markdown Support**: Convert markdown formatting to Anki-compatible HTML
- **Input Validation**: Clear error messages for invalid card data
- **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

```bash
# 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:
```bash
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

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

# Run tests
pytest -v

# Run with coverage
pytest --cov=anki_utils
```

## Repository Structure

```
anki-package/
├── anki_utils/          # Published PyPI package
│   ├── exporter.py      # Core .apkg generation
│   ├── markdown.py      # Markdown to HTML conversion
│   ├── themes.py        # CSS theme definitions
│   ├── occlusion.py     # Image occlusion detection
│   ├── cli.py           # Command-line interface
│   ├── ROADMAP.md       # Development roadmap
│   └── CHANGELOG.md     # Version history
├── tests/               # Test suite (pytest)
├── docs/                # Agent-focused documentation
├── archive/             # Legacy files (reference only)
└── .github/workflows/   # CI/CD (runs tests on push/PR)
```

## License

MIT
