Metadata-Version: 2.4
Name: arete
Version: 1.0.0
Summary: A robust, fast, and feature-rich CLI for syncing Obsidian vault to Anki.
Project-URL: Repository, https://github.com/Adanato/obsidian_2_anki
Author-email: Adam Nguyen <AdanatoNw@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: anki,obsidian,spaced-repetition,sync
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Education
Requires-Python: ==3.11.*
Requires-Dist: httpx>=0.28.1
Requires-Dist: markdown>=3.10
Requires-Dist: pydantic-settings[toml]>=2.12.0
Requires-Dist: pydantic>=2.12.5
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: requests>=2.31.0
Requires-Dist: tqdm>=4.67.1
Requires-Dist: typer[all]>=0.21.0
Description-Content-Type: text/markdown

# Arete (formerly o2a)

**Pro-grade synchronization from Obsidian to Anki.**

`arete` is a robust, fast, and feature-rich tool that adheres to a strict **One-Way Sync** philosophy: **Obsidian is the Source of Truth**.

```mermaid
graph TD
    subgraph "Obsidian Vault"
        MD["Markdown Files"]
        Media["Images/Files"]
    end

    subgraph "Sync Component (Arete)"
        CLI["Python CLI"]
        Plugin["Obsidian Plugin (GUI wrapper)"]
        Cache[("SQLite Cache")]
    end

    subgraph "Anki"
        AC["AnkiConnect / apy"]
        CollectionMedia["collection.media (Filesystem)"]
        Cards["Anki Decks"]
    end

    MD --> Plugin
    Plugin -- "Invokes" --> CLI
    CLI <--> Cache
    CLI -- "Pushes Notes" --> AC
    CLI -- "Copies Media" --> CollectionMedia
    AC --> Cards
```

---

## 📚 Documentation
- **[CLI Guide](./docs/cli_guide.md)**: Command-line usage, configuration, and syntax.
- **[Obsidian Plugin Guide](./docs/plugin_guide.md)**: Installation and usage of the Obsidian plugin.
- **[Architecture](./docs/ARCHITECTURE.md)**: Deep dive into how it works.
- **[Troubleshooting](./docs/troubleshooting.md)**: Common fixes for WSL, networking, and sync issues.

---

## Quick Start

### 1. Install CLI (Python)
Ensure you have [uv](https://github.com/astral-sh/uv) installed.
```bash
git clone https://github.com/Adanato/obsidian_2_anki
cd obsidian_2_anki
uv sync
```

### 2. Install Plugin (Optional)
Download `main.js`, `manifest.json`, `styles.css` from [Releases](https://github.com/Adanato/obsidian_2_anki/releases) and place in `.obsidian/plugins/obsidian-2-anki`.

### 3. Initialize & Sync
```bash
uv run arete init   # Set up your vault path
uv run arete sync   # First sync (will scan and link cards)
```

## Key Features
- ⚡ **Fast**: SQLite caching skips unchanged files, making syncs near-instant.
- 🧹 **Prune Mode**: Automatically removes cards from Anki that you've deleted in Obsidian.
- 🩹 **Self-Healing**: Fixes duplicate IDs or broken links automatically.
- 📐 **MathJax/LaTeX**: Native protection for complex mathematical notation.
- 📸 **Media Support**: Full synchronization of local images and attachments.
- 💻 **WSL Friendly**: Specialized bridge for Windows Subsystem for Linux users.

## License
MIT

## Roadmap
- [ ] **Community Plugin**: Official Obsidian Community Plugins list submission.
- [ ] **PyPI Release**: Publish as `obsianki` via `uv publish`.
- [ ] **Cloud Sync**: Research remote sync strategies.
