Metadata-Version: 2.4
Name: protonabu
Version: 1.0.0
Summary: Open source infrastructure for authoring Domain-Specific Languages (DSLs), originally facilitating the Nabu Design Language
Author-email: Avner Ben <avnerben6@gmail.com>
License: MIT
Keywords: nabu,design,facts,parser,schema,dsl
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: Programming Language :: Python :: 3.14
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Compilers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyparsing>=3.0.0
Dynamic: license-file

# Protonabu

*Open source infrastructure for authoring Domain-Specific Languages (DSLs), originally facilitating the Nabu Design Language.*

- **Author:** Avner Ben
- **Version:** 1.0.0
- **License:** MIT

---

## Overview

**Protonabu** is the self-contained parser and runtime substrate of the Nabu ecosystem. It provides:

1. **Fact Parsing & Schema Engine:** Hierarchical, indentation-aware fact-base parsing against dynamic BNF-like schemas (`ProtonabuParser`, `ProtonabuSchema`, `RawFact`, `TokenizedFact`).
2. **Snippet Adapters:** Bi-directional snippet conversion and round-tripping for multiple structured formats including Markdown, JSON, and XML (`FactSnippetAdapter`, `snippetAdapterFactory`).
3. **Core Utility Library:** Standardized naming conventions (`NameMaker`, `QuantityNarrator`, `DocDate`), hierarchy traversal utilities (`iterUp`, `iterUps`, `find`, `findBehind`, `findNested`), progress reporting (`IProgressIndicator`, `DummyProgressIndicator`), and typed structured exception hierarchies (`Error`, `InternalError`, `ParsingError`, `FactFileError`).
4. **Testing Infrastructure:** Common testing harness and runner for test discovery and regression test execution (`testing.py`).
5. **Educational Site Generator Demo:** A complete demonstration application that compiles `.facts` site descriptions into static HTML sites and multi-page hyperlinked PDF books (`SiteGenerator`, `SiteParser`, `pdfExporter`).

---

## Installation

```bash
pip install protonabu
```

Or for local development:

```bash
pip install -e .
```

---

## Running Tests

To run the complete test suite:

```bash
python programs/testAll.py
```

---

## Architecture & Interfaces

Detailed specifications and exported design interfaces are available in `doc/`:
- `doc/ProtonabuUserGuide.md` — Protonabu User Guide & Architecture
- `doc/NabuInCodeDocumentation.md` — Nabu In-Code Documentation Standards
- `doc/exported/` — Nabu design fact-bases and formal exported interface definitions
