A sphinx extension for documenting IETF Internet-Draft versions
Project description
sphinx-xml2rfc
A sphinx
extension providing features to document work-in-progress
Internet-Drafts using git
history.
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 inxml2rfc_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 branchref
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sphinx-xml2rfc-0.1.0rc1.tar.gz
.
File metadata
- Download URL: sphinx-xml2rfc-0.1.0rc1.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53f46c0dce285a3ee994271895593fdba93353da2fd29cadef35ff18235bf581 |
|
MD5 | 10f6399711651f6da4ccf183d9053811 |
|
BLAKE2b-256 | bf1a3651271c8a94e25a2a1ce7a5289f15d2557d679ad1436f0ccba97b7d5b03 |
File details
Details for the file sphinx_xml2rfc-0.1.0rc1-py3-none-any.whl
.
File metadata
- Download URL: sphinx_xml2rfc-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 328681372b99af47d2c6e76ab5b6694663cae02b013c4830da538a78fb70ea3a |
|
MD5 | 5c3479d520afe74dd35bafcd5c7c8eb2 |
|
BLAKE2b-256 | cafac67dece0ada6f99cce60ccda5f70b47a366f29eb73ffd78d8c2459444d86 |