Metadata-Version: 2.4
Name: asciidoc-gen
Version: 0.1.0
Summary: A library to generate asciidoc documents.
Author: René Beckmann
Author-email: René Beckmann <rene.bckmnn@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.12, <4
Project-URL: Repository, https://github.com/BeckmaR/asciidoc-gen
Description-Content-Type: text/markdown

# AsciiDoc-Gen

This is a library to generate [AsciiDoc](https://docs.asciidoctor.org/asciidoc/latest/) sources written in Python.

The API of this library is inspired by [NiceGUI](https://nicegui.io). Documents are created as ASTs using Python context managers:

```Python
with adg.AsciiDocDocument(path=doc_path) as doc:
    with adg.Section(text="Hello AsciiDoc"):
        adg.IDAttribute("custom_id")
    with adg.Paragraph():
        adg.Text("This is a test document.")
        adg.Text("It showcases multiple AsciiDoc syntax elements.")
    with adg.List():
        adg.Title("Lists!")
        adg.UnorderedListItem("Lists")
        adg.UnorderedListItem("Lists")
        adg.UnorderedListItem("Lists")

    doc.render()
```

The document is rendered like this:

```AsciiDoc
[#custom_id]
= Hello AsciiDoc

This is a test document.
It showcases multiple AsciiDoc syntax elements.

.Lists!
* Lists
* Lists
* Lists
```
