Metadata-Version: 2.5
Name: pro-ledin-media-import
Version: 0.1.3
Summary: Faithful media and document imports into Markdown corpora
Author: Michael Ledin
License: MIT License
        
        Copyright (c) 2026 Michael Ledin
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: docling-slim[format-video]<3,>=2.121
Requires-Dist: docling<3,>=2.121
Requires-Dist: pro-ledin-ocr<0.7,>=0.6.1
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: mypy>=1.15; extra == 'dev'
Requires-Dist: pytest-cov>=6.0; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.11; extra == 'dev'
Provides-Extra: docling-vlm
Requires-Dist: docling[vlm]; extra == 'docling-vlm'
Provides-Extra: office-fallback
Requires-Dist: markitdown[docx,pptx,xlsx]; extra == 'office-fallback'
Requires-Dist: openpyxl; extra == 'office-fallback'
Description-Content-Type: text/markdown

# media-import

`media-import` faithfully converts audio, video, documents, images, local folders,
and direct HTTP(S) media URLs into an Obsidian-compatible Markdown corpus.

Docling is the sole media conversion engine. `pro-ledin-ocr` recognizes visual
text in sampled video frames and image-based documents when needed.

## Install

Install the published package and verify the CLI:

```bash
python -m pip install pro-ledin-media-import
media-import --help
```

On macOS, install the system video dependencies separately:

```bash
brew install ffmpeg
ffmpeg -version
ffprobe -version
```

## Install for development

```bash
uv sync --extra dev
uv run media-import --help
```

The published `docling` package supplies standard document support, while
`docling-slim[format-video]` supplies the current video/ASR dependencies.
Docling media conversion also requires `ffmpeg` and `ffprobe`. Model downloads
are never started by `inspect` or `--dry-run`.

## Workflow

```bash
uv run media-import inspect ./recordings --vault-root ~/vault --output-dir sources/demo
uv run media-import import ./recordings --vault-root ~/vault --output-dir sources/demo --dry-run
uv run media-import import ./recordings --vault-root ~/vault --output-dir sources/demo --confirmed
uv run media-import validate --output-dir ~/vault/sources/demo --source ./recordings
uv run media-import status --output-dir ~/vault/sources/demo
```

The first real import requires the exact dry-run plan to have been confirmed by
the caller with `--confirmed`. An OpenCode agent should show the dry-run to the
user before adding this flag.

## Configuration

CLI arguments override environment variables, which override `config.json`.
See `config.example.json` and `references/routing.md`.

The canonical environment prefix is `MEDIA_IMPORT_`. Credentials are never
written to the manifest or included in cache-profile hashes.
