Metadata-Version: 2.4
Name: flare-builder
Version: 0.2.0
Summary: Homemade MadCap Flare-compatible documentation builder
Project-URL: Homepage, https://github.com/leonardo-toffalini/flare-builder
Project-URL: Repository, https://github.com/leonardo-toffalini/flare-builder
Project-URL: Issues, https://github.com/leonardo-toffalini/flare-builder/issues
Project-URL: Changelog, https://github.com/leonardo-toffalini/flare-builder/blob/main/CHANGELOG.md
Author-email: Leonardo Toffalini <leonardotoffalini@gmail.com>
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.14
Requires-Dist: lxml==6.0.4
Requires-Dist: playwright>=1.49.0
Requires-Dist: pymupdf>=1.24.0
Provides-Extra: dev
Requires-Dist: pytest-azurepipelines==1.0.5; extra == 'dev'
Requires-Dist: pytest-nunit==1.0.7; extra == 'dev'
Requires-Dist: pytest-xdist==3.8.0; extra == 'dev'
Requires-Dist: pytest==8.4.1; extra == 'dev'
Description-Content-Type: text/markdown

# flare-builder

Python package that compiles MadCap Flare `.fltar` / `.flbat` targets into HTML
sites and PDFs without MadCap Flare / `madbuild`.

## Install

```bash
pip install flare-builder
# or
uv add flare-builder
```

Requires Python 3.14+. PDF builds need a Chromium browser for Playwright:

```bash
playwright install chromium
```

## Usage

Point `-project` at any Flare project root (or its `.flprj`):

```bash
flare-builder -project /path/to/docs/en.flprj \
  -target Project/Targets/FeatureGuide-HTML5

flare-builder -project /path/to/docs/en.flprj \
  -batch all-HTML5.flbat -workers 4
```

From a checkout of this repo (editable):

```bash
uv sync --extra dev
uv run playwright install chromium
uv run python -m flare_builder \
  -project ../ARS-docs/en.flprj \
  -target Project/Targets/FeatureGuide-HTML5
```

## Output

Writes Flare-compatible paths under the **project**:

`Output/<username>/<TargetName>/`

HTML5 matches madbuild WebHelp2 shape (guides paths, skins, Data/Tocs, topic
chrome). PDF: `_print.html` + resolved `.pdf` + `build.log`.

Vendored runtime: see [`flare_builder/runtime/README.md`](flare_builder/runtime/README.md).

## Development / ground-truth tests

Defaults to sibling `../ARS-docs` (`Output_exact/` + homemade `Output/`).
Override with `--project-root` or `FLARE_PROJECT_ROOT`.

```bash
uv sync --extra dev
uv run pytest -v -m "not ground_truth"
uv run pytest -v -m ground_truth
uv run pytest -v --rebuild-homemade
```

Markdown one-to-one compare needs the optional `parity` group (private Azure
index for `oi-html-to-markdown`):

```bash
uv sync --extra dev --group parity
uv run pytest -v flare_builder/tests/test_htm_markdown_one_to_one.py
```

## License

MIT — see [LICENSE](LICENSE).
