Metadata-Version: 2.4
Name: pro-ledin-healthos
Version: 0.5.0
Summary: Recognize a family medical archive into tracked Obsidian Markdown, delegating OCR to pro-ledin-ocr.
Project-URL: Homepage, https://github.com/ledin-pro/healthos
Project-URL: Repository, https://github.com/ledin-pro/healthos
Author: mxl
License-Expression: MIT
License-File: LICENSE
Keywords: healthos,markdown,medical,obsidian,ocr
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Text Processing :: Markup :: Markdown
Requires-Python: >=3.10
Requires-Dist: pro-ledin-ocr>=0.1.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: pyyaml>=6.0; extra == 'dev'
Provides-Extra: vision
Requires-Dist: pro-ledin-ocr[vision]>=0.1.0; extra == 'vision'
Description-Content-Type: text/markdown

# pro-ledin-healthos

Recognize an external family medical archive (PDFs, scans, photos) into tracked
Obsidian Markdown that mirrors the source folder structure one-to-one. OCR is
delegated to the [`pro-ledin-ocr`](https://github.com/ledin-pro/ocr) package,
imported as a library. HealthOS never interprets medical content — it only
transcribes and mirrors.

- Import name: `pro.ledin.healthos`
- Console script: `healthos`
- PyPI: `pro-ledin-healthos`

## Install

```bash
pip install pro-ledin-healthos            # pulls in pro-ledin-ocr
pip install "pro-ledin-healthos[vision]"  # + OpenAI-compatible vision-api engine
```

System binaries `poppler` and `tesseract` are required for the local OCR path.

## Configure

Set the `AGENT_HEALTH_*` environment variables (see `SKILL.md` for the full
list):

```bash
export AGENT_HEALTH_SOURCE_DIR=/absolute/path/to/source   # ':'-separated for many
export AGENT_HEALTH_TARGET_DIR=/path/to/vault/03-areas/health
export AGENT_HEALTH_CACHE_DIR=~/Library/Caches/healthos
export AGENT_HEALTH_OCR_ENGINE=vision-api
# vision-api engine also needs:
export AGENT_HEALTH_VISION_API_URL=http://127.0.0.1:1234/v1
export AGENT_HEALTH_VISION_API_KEY=token
export AGENT_HEALTH_VISION_MODEL=model-name
```

Never store real credentials in tracked files.

## Run

```bash
healthos index            # recognize + mirror into the target
healthos index --check    # verify cache/outputs without writing
```

By default HealthOS imports the installed `pro-ledin-ocr` package. Set
`AGENT_HEALTH_OCR_SCRIPT=/path/to/ocr.py` to load an alternative
`ocr.py`-shaped module from a file instead (importlib escape hatch).

## Development

Local dev resolves `pro-ledin-ocr` from a sibling `../ocr` checkout via
`[tool.uv.sources]` in `pyproject.toml`:

```bash
uv run --extra dev pytest
uv build
```

To test against the published `pro-ledin-ocr` from PyPI instead (as CI does),
add `--no-sources`:

```bash
uv run --no-sources --extra dev pytest
uv build --no-sources
```

## License

MIT
