Metadata-Version: 2.4
Name: udsdoc
Version: 0.75.0
Summary: Generate UDS (ISO 14229 / 15765) specification documents and ISO 22901-1 ODX/PDX from AUTOSAR DCM/CanTp/DEM ARXML (formerly udsxml2tex)
Author: udsdoc contributors
License: MIT
Keywords: autosar,arxml,uds,dcm,dem,cantp,iso14229,iso15765,iso22901,odx,pdx,latex,tex,diagnostics,udsxml2tex
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Manufacturing
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
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: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Software Development :: Embedded Systems
Classifier: Topic :: Text Processing :: Markup :: LaTeX
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: lxml>=4.9.0
Requires-Dist: Jinja2>=3.1.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Requires-Dist: ruff>=0.1; extra == "dev"
Provides-Extra: web
Requires-Dist: fastapi>=0.100.0; extra == "web"
Requires-Dist: uvicorn>=0.22.0; extra == "web"
Requires-Dist: python-multipart>=0.0.6; extra == "web"
Requires-Dist: PyYAML>=6.0; extra == "web"
Requires-Dist: python-dotenv>=1.0; extra == "web"
Requires-Dist: pymupdf>=1.24; extra == "web"
Provides-Extra: yaml
Requires-Dist: PyYAML>=6.0; extra == "yaml"
Provides-Extra: svg
Requires-Dist: pymupdf>=1.24; extra == "svg"
Provides-Extra: watch
Requires-Dist: watchdog>=3.0; extra == "watch"
Provides-Extra: lsp
Requires-Dist: pygls>=1.2; extra == "lsp"
Provides-Extra: progress
Requires-Dist: tqdm>=4.65; extra == "progress"
Provides-Extra: rich
Requires-Dist: rich>=13.0; extra == "rich"
Provides-Extra: viz
Requires-Dist: matplotlib>=3.5; extra == "viz"
Requires-Dist: numpy>=1.20; extra == "viz"
Provides-Extra: llm
Requires-Dist: anthropic>=0.40.0; extra == "llm"
Requires-Dist: openai>=1.0.0; extra == "llm"
Provides-Extra: ecu-test
Requires-Dist: python-can>=4.3.0; extra == "ecu-test"
Requires-Dist: python-isotp>=2.0.0; extra == "ecu-test"
Provides-Extra: all
Requires-Dist: fastapi>=0.100.0; extra == "all"
Requires-Dist: uvicorn>=0.22.0; extra == "all"
Requires-Dist: python-multipart>=0.0.6; extra == "all"
Requires-Dist: PyYAML>=6.0; extra == "all"
Requires-Dist: python-dotenv>=1.0; extra == "all"
Requires-Dist: pymupdf>=1.24; extra == "all"
Requires-Dist: watchdog>=3.0; extra == "all"
Requires-Dist: pygls>=1.2; extra == "all"
Requires-Dist: tqdm>=4.65; extra == "all"
Requires-Dist: rich>=13.0; extra == "all"
Requires-Dist: matplotlib>=3.5; extra == "all"
Requires-Dist: numpy>=1.20; extra == "all"
Requires-Dist: anthropic>=0.40.0; extra == "all"
Requires-Dist: openai>=1.0.0; extra == "all"
Requires-Dist: python-can>=4.3.0; extra == "all"
Requires-Dist: python-isotp>=2.0.0; extra == "all"
Provides-Extra: ci-test
Requires-Dist: fastapi>=0.100.0; extra == "ci-test"
Requires-Dist: uvicorn>=0.22.0; extra == "ci-test"
Requires-Dist: python-multipart>=0.0.6; extra == "ci-test"
Requires-Dist: PyYAML>=6.0; extra == "ci-test"
Requires-Dist: python-dotenv>=1.0; extra == "ci-test"
Requires-Dist: pymupdf>=1.24; extra == "ci-test"
Requires-Dist: watchdog>=3.0; extra == "ci-test"
Requires-Dist: pygls>=1.2; extra == "ci-test"
Requires-Dist: tqdm>=4.65; extra == "ci-test"
Requires-Dist: rich>=13.0; extra == "ci-test"
Requires-Dist: matplotlib>=3.5; extra == "ci-test"
Requires-Dist: numpy>=1.20; extra == "ci-test"
Requires-Dist: anthropic>=0.40.0; extra == "ci-test"
Requires-Dist: openai>=1.0.0; extra == "ci-test"
Dynamic: license-file

# udsdoc

**AUTOSAR DCM/CanTp/DEM ARXML → ISO 14229 (UDS) / 15765 / 22901-1 (ODX/PDX) specification documents.**

[![PyPI version](https://badge.fury.io/py/udsdoc.svg)](https://badge.fury.io/py/udsdoc)
[![Python](https://img.shields.io/pypi/pyversions/udsdoc.svg)](https://pypi.org/project/udsdoc/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

`udsdoc` parses AUTOSAR diagnostic ARXML (DCM, CanTp, DEM, DoIP, COM, AP) and
renders a complete UDS specification in **LaTeX / PDF / HTML / Markdown / RST**,
plus **ASAM ODX 2.2.0 / PDX** (ISO 22901-1) for diagnostic tooling. Drive it from
the **command line** or a local **browser UI** — both run the same pipeline.

> Renamed from `udsxml2tex` in v0.66.0. The old package, `udsxml2tex` CLI,
> `UDSXML2TEX_*` env vars and pre-commit hook ids keep working as deprecated
> aliases until v1.0.

## Install

```bash
pip install udsdoc          # core (LaTeX / Markdown / RST)
pip install udsdoc[web]     # browser UI (--serve) + inline SVG figures
pip install udsdoc[all]     # everything
```

PDF output needs a LaTeX distribution with `xelatex` (TeX Live / MiKTeX).
The `[all]` extra pulls in every optional feature (browser UI, LLM analysis, ECU hardware testing, and more).

## Command line

```bash
udsdoc dcm.arxml -o spec.tex                              # single ARXML → LaTeX
udsdoc dcm.arxml cantp.arxml --dem dem.arxml -o spec.tex  # merge modules
udsdoc --repo /path/to/bsw-project -o spec.tex            # auto-discover a BSW repo
udsdoc dcm.arxml --format html -o spec.html               # other formats: html, md, rst, pdx
udsdoc dcm.arxml --pdf                                    # compile to PDF
udsdoc dcm.arxml --lang en+ja -o spec.tex                 # stacked multi-language output
```

Python API:

```python
from udsdoc import ArxmlParser, TexGenerator

spec = ArxmlParser().parse_multi(["dcm.arxml", "cantp.arxml"])
TexGenerator().generate(spec, "spec.tex")
```

## Browser UI

```bash
pip install udsdoc[web]
udsdoc --serve            # opens http://127.0.0.1:8765
```

A local server with four tabs in the sidebar:

- **Generate** — point it at a BSW repository folder (or load a built-in sample
  bundle). The server scans every ARXML / C file, classifies the Dcm / CanTp /
  Dem modules and auto-detects single- vs multi-ECU. Pick output language(s),
  then **Parse & Preview** to inspect the spec and **Generate & Download** a
  LaTeX ZIP (with `spec.pdf` when `xelatex` is available) — or **Export ODX /
  PDX** for CANalyzer / CANoe. An optional Compliance Matrix CSV adds a
  requirements-compliance chapter.
- **Spec** — parsed sessions, services, DIDs, RIDs and DTCs as browsable tables.
- **Chat** — ask questions about the loaded spec via an LLM (Anthropic /
  OpenAI-compatible / Ollama).
- **About** — version and build info.

## License

MIT
