Skip to main content

sphinx-xml2rfc

A sphinx extension providing features to document work-in-progress Internet-Drafts using git history.

PyPI CI/CD codecov Updates

Overview

The extension contains two primary components:

Versioned document generation

Hooks sphinx-build initialisation, and searches the local git repository for refs, and uses xml2rfc to build each version of the named drafts.

These are written to the sphinx source directory tree for use during the build phase.

sphinx language domain

The xml2rfc domain provides directives for rendering Internet-Draft texts and for displaying changes between versions.

Documentation sources containing the appropriate directives can optionally be auto-generated, after the fashion of sphinx-apidoc

Installation

python -m pip install sphinx-xml2rfc

Usage

To use, add sphinx_xml2rfc to extensions in conf.py:

extensions = [
    ...,
    sphinx_xml2rfc,
    ...
]

The following configuration options are available:

  • xml2rfc_drafts

    Iterable of draft names for which to auto-generate text versions from xml sources using xml2rfc.

    Each name should match the name of the XML source file (without the .xml extension) in the root of the repository tree.

    default: []

  • xml2rfc_sources

    Iterable of file names required by xml2rfc to process the documents in xml2rfc_drafts.

    default: []

  • xml2rfc_remotes

    Iterable of git remote names to consider when searching for branch refs.

    Local heads will be considered first, after which each remote will be searched in order. Only the first branch ref with a given name will be used.

    default: ["origin"]

  • xml2rfc_autogen_docs

    Enable the automatic generation of sphinx source documents.

    default: True

  • xml2rfc_autogen_branch_re

    Regex pattern for selection of branch names to generate document versions for.

    default: r"^main|master$"

  • xml2rfc_autogen_tag_re

    Regex pattern for selection of tag names to generate document versions for.

    default: r"^.+$"

  • xml2rfc_output

    Directory name in which to output files. Relative to sphinx confdir.

    default: "_xml2rfc"

MIT License

Copyright (c) 2021 Ben Maddison

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for sphinx-xml2rfc 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-xml2rfc 0.1.0
File Size Uploaded Provenance Actions
sphinx-xml2rfc-0.1.0.tar.gz 17.3 kB Without provenance Details for sphinx-xml2rfc-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-xml2rfc 0.1.0
File Interpreter ABI Platform Actions
sphinx_xml2rfc-0.1.0-py3-none-any.whl Python 3 none any Details for sphinx_xml2rfc-0.1.0-py3-none-any.whl

Total release size: 28.8 kB

Release files / sphinx-xml2rfc-0.1.0.tar.gz

Download URL sphinx-xml2rfc-0.1.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fca7bed6cb34b09e267eef3e9fc320ff043ed1c30c52b25c4fe3cac53a933841
BLAKE2b-256 checksum
How to use checksums
dff2d735efd92cf4086591a9f53fc18daa9774c32b14b1846e525cdc037d2164
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

Release files / sphinx_xml2rfc-0.1.0-py3-none-any.whl

Download URL sphinx_xml2rfc-0.1.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00ea759002558f276e753c7a7b9d38238ad294490211fc5e3432c08c29d866bf
BLAKE2b-256 checksum
How to use checksums
e61aa1b26fbb758360932dfa7d2d1c4c82e207a1d63dc92819ee26d878f0fb1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

Security for sphinx-xml2rfc 0.1.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page