This release is a pre-release and may not be stable for production use.
= Sphinx-AsciiDoctrine
:toc: left
:toclevels: 3
:icons: font
:source-highlighter: pygments
image:https://img.shields.io/pypi/v/sphinx-asciidoctrine.svg["PyPI Version", link="https://pypi.org/project/sphinx-asciidoctrine"]
image:https://img.shields.io/pypi/pyversions/sphinx-asciidoctrine.svg["Python Versions"]
image:https://img.shields.io/github/license/webmaven/sphinx-asciidoctrine.svg["License", link="https://github.com/webmaven/sphinx-asciidoctrine/blob/main/LICENSE"]
image:https://img.shields.io/badge/code%20style-ruff-000000.svg["Ruff", link="https://github.com/astral-sh/ruff"]
[.lead]
*Sphinx-AsciiDoctrine* is a modern, highly conforming Sphinx extension providing comprehensive AsciiDoc support. Powered by the Lark-based `asciidoctrine` parser and compliant with the Eclipse AsciiDoc ASG specification.
== Project Links
* *GitHub Repository*: https://github.com/webmaven/sphinx-asciidoctrine
* *PyPI Package*: https://pypi.org/project/sphinx-asciidoctrine/
* *Official Documentation*: https://webmaven.github.io/sphinx-asciidoctrine/
== Features
* *Full-Fidelity Parsing*: Seamlessly compiles `.adoc` and `.asciidoc` files into standard Docutils nodes.
* *Interactive Autodoc Processing*: Dynamically parses and translates AsciiDoc syntax inside Python docstrings for `sphinx.ext.autodoc` pipelines.
* *Static Analysis Friendly*: Exposes a native Docutils parser designed for modern static analysis pipelines like `sphinx-autodoc2`.
* *Optimized for Parallelism*: Fully safe and optimized for Sphinx parallel read and write documentation builds.
* *Robust Fault Tolerance*: Gracefully captures and lists docstring formatting syntax errors inline inside the rendered document without crashing your build.
== Installation
To install from PyPI:
[source,bash]
----
pip install sphinx-asciidoctrine
----
== Usage
To use Sphinx-AsciiDoctrine, add `sphinx_asciidoctrine` to the `extensions` list in your Sphinx project's `conf.py` file:
[source,python]
----
extensions = [
"sphinx_asciidoctrine",
"sphinx.ext.autodoc",
]
----
=== Toggling Docstring Processing
[NOTE]
====
By default, Sphinx-AsciiDoctrine will automatically process all Python docstrings as AsciiDoc and compile them to reStructuredText (reST) during standard autodoc build phases.
====
If your project utilizes AsciiDoc for main documentation files but uses standard reST or Markdown within Python docstrings, you can easily disable automatic docstring translation by setting `asciidoc_process_docstrings` to `False` in your `conf.py`:
[source,python]
----
# Disable automatic AsciiDoc processing for Python docstrings
asciidoc_process_docstrings = False
----
=== Static Analysis with `sphinx-autodoc2`
To document your project using the static analyzer `sphinx-autodoc2` with AsciiDoc docstrings, configure your `conf.py` as follows:
[source,python]
----
extensions = [
"autodoc2",
"sphinx_asciidoctrine",
]
autodoc2_packages = [
"../src/my_package",
]
autodoc2_docstring_parser_regexes = [
(r".*", "sphinx_asciidoctrine.parser"),
]
----
== Interactive Examples
The following interactive code example is verified automatically as a doctest using `asciidoctest`:
[source,python]
----
>>> from sphinx_asciidoctrine import setup
>>> result = setup(None)
>>> isinstance(result, dict)
True
>>> result["parallel_read_safe"]
True
----
== License
This project is licensed under the Apache Software License, Version 2.0. For more details, see the link:LICENSE[LICENSE] file.
Metadata
Release files for sphinx-asciidoctrine 0.1.0a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sphinx_asciidoctrine-0.1.0a2.tar.gz | 12.7 kB | Without provenance | Details for sphinx_asciidoctrine-0.1.0a2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sphinx_asciidoctrine-0.1.0a2-py3-none-any.whl | Python 3 | none | any | Details for sphinx_asciidoctrine-0.1.0a2-py3-none-any.whl |
Total release size: 22.1 kB
Release files / sphinx_asciidoctrine-0.1.0a2.tar.gz
| Download URL | sphinx_asciidoctrine-0.1.0a2.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3000c206a3ca2fb26d8140182a0f2ca84984dfb3613aa61d0168ad1b3f8ba9fd
|
|
BLAKE2b-256 checksum How to use checksums |
b91ff93812f370fe0aa9d6acdba47f45a0c1472d69f2368c01a11f8e81f8e6e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / sphinx_asciidoctrine-0.1.0a2-py3-none-any.whl
| Download URL | sphinx_asciidoctrine-0.1.0a2-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b207db6455c61953f237bcc6ecab2bb649554902c191a827d43f4d242a053f8
|
|
BLAKE2b-256 checksum How to use checksums |
0b87fe9d1709fa2dba6c9a0eca500c104bc545c46ac93aa2d30af9073a58c40c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for sphinx-asciidoctrine 0.1.0a2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.