xml2rfc


Namexml2rfc JSON
Version 3.27.0 PyPI version JSON
download
home_pageNone
Summaryxml2rfc generates RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies.
upload_time2025-02-07 00:05:15
maintainerNone
docs_urlNone
authorHenrik Levkowetz
requires_python>=3.9
licenseBSD 3-Clause License Copyright (c) 2022, IETF Trust All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords ietf rfc id internet-draft xml xml2rfc xmlrfc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
    
<img src="https://raw.githubusercontent.com/ietf-tools/common/main/assets/logos/xml2rfc.svg" alt="XML2RFC" height="125" />
    
[![Release](https://img.shields.io/github/release/ietf-tools/xml2rfc.svg?style=flat&maxAge=600)](https://github.com/ietf-tools/xml2rfc/releases)
[![License](https://img.shields.io/github/license/ietf-tools/xml2rfc)](https://github.com/ietf-tools/xml2rfc/blob/main/LICENSE)
[![PyPI - Version](https://img.shields.io/pypi/v/xml2rfc)](https://pypi.org/project/xml2rfc/)
[![PyPI - Status](https://img.shields.io/pypi/status/xml2rfc)](https://pypi.org/project/xml2rfc/)
[![PyPI - Format](https://img.shields.io/pypi/format/xml2rfc)](https://pypi.org/project/xml2rfc/)
    
##### Generate RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies
    
</div>

- [Changelog](https://github.com/ietf-tools/xml2rfc/blob/main/CHANGELOG.md)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md)
- [Getting Started](#getting-started)
    - [Git Cloning Tips](#git-cloning-tips)
    - [Docker Dev Environment](#docker-dev-environment)
- [Release Procedure](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md#release-procedure)

---

### Introduction

The [IETF] uses a specific format for the standards and other documents it publishes as [RFCs], and for the draft documents which are produced when developing documents for publications. There exists a number of different tools to facilitate the formatting of drafts and RFCs according to the existing rules, and this tool, **xml2rfc**, is one of them. It takes as input an xml file that contains the text and meta-information about author names etc., and transforms it into suitably formatted output. The input xml file should follow the grammars in [RFC7749] *(for v2 documents)* or [RFC7991] *(for v3 documents)*. Note that the grammar for v3 is still being refined, and changes will eventually be captured in the [bis draft for 7991]. Changes not yet captured can be seen in the xml2rfc source [v3.rng], or in the [documentation xml2rfc produces] with its `--doc` flag.

**xml2rfc** provides a variety of output formats. See the command line help for a full list of formats. It also provides conversion from v2 to v3, and can run the [preptool] on its input.

### Installation

Installation of the python package is done as usual with `pip install xml2rfc`, using appropriate switches.

#### Installation of support libraries for the PDF-formatter

In order to generate PDFs, **xml2rfc** uses the [WeasyPrint] module, which depends on external libraries that must be installed as native packages on your platform, separately from the **xml2rfc** install.

1. First, install the **Pango**, and other required libraries on your system.  See installation instructions on the [WeasyPrint Docs].

2. Next, install WeasyPrint python modules using pip.

```sh
pip install "xml2rfc[pdf]"
```
3. Finally, install the required fonts:
  * Download latest fonts from [xml2rfc-fonts](https://github.com/ietf-tools/xml2rfc-fonts/releases/latest).
  * In the **Assets** section, download either the `tar.gz` or the `zip` archive.
  * Extract the contents of the downloaded `xml2rfc-fonts` archive.
  * Install the fonts found in the `noto` and `roboto_mono` directories to your operating system.

With these installed and available to **xml2rfc**, the `--pdf` switch will be enabled.

### Usage

**xml2rfc** accepts a single XML document as input and outputs to one or more conversion formats.

#### Basic Usage

```sh
xml2rfc SOURCE [options] FORMATS...
```

Run `xml2rfc --help` for a full listing of command-line options.

### Getting Started

This project is following the standard **Git Feature Workflow** development model. Learn about all the various steps of the development workflow, from creating a fork to submitting a pull request, in the [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md) guide.

> Make sure to read the [Styleguides](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md#styleguides) section to ensure a cohesive code format across the project.

You can submit bug reports, enhancements and new feature requests in the [discussions](https://github.com/ietf-tools/xml2rfc/discussions) area. Accepted tickets will be converted to issues.

#### Git Cloning Tips

As outlined in the [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md) guide, you will first want to create a fork of the xml2rfc project in your personal GitHub account before cloning it.

For example *(replace `USERNAME` with your GitHub username)*:

```sh
git clone https://github.com/USERNAME/xml2rfc.git
```
#### Docker Dev Environment

Run `./run.sh` command to build and start a docker development environment.
The initial build may take time because it downloads all required fonts as well.


```sh
./run.sh
```

[IETF]: https://www.ietf.org/
[RFCs]: https://www.rfc-editor.org/
[RFC7749]: https://www.rfc-editor.org/info/rfc7749
[RFC7991]: https://www.rfc-editor.org/info/rfc7991
[bis draft for 7991]: https://datatracker.ietf.org/doc/draft-iab-rfc7991bis/
[v3.rng]: xml2rfc/data/v3.rng
[documentation xml2rfc produces]: https://ietf-tools.github.io/xml2rfc/
[preptool]: https://www.rfc-editor.org/info/rfc7998
[WeasyPrint]: https://weasyprint.org/
[WeasyPrint Docs]: https://doc.courtbouillon.org/weasyprint/stable/first_steps.html

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "xml2rfc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "IETF Tools <tools-help@ietf.org>",
    "keywords": "ietf, rfc, id, internet-draft, xml, xml2rfc, xmlrfc",
    "author": "Henrik Levkowetz",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/99/ad/471803a489c93804239986c64b0b3ae3b5b898e367fff5418739e7e7622b/xml2rfc-3.27.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n    \n<img src=\"https://raw.githubusercontent.com/ietf-tools/common/main/assets/logos/xml2rfc.svg\" alt=\"XML2RFC\" height=\"125\" />\n    \n[![Release](https://img.shields.io/github/release/ietf-tools/xml2rfc.svg?style=flat&maxAge=600)](https://github.com/ietf-tools/xml2rfc/releases)\n[![License](https://img.shields.io/github/license/ietf-tools/xml2rfc)](https://github.com/ietf-tools/xml2rfc/blob/main/LICENSE)\n[![PyPI - Version](https://img.shields.io/pypi/v/xml2rfc)](https://pypi.org/project/xml2rfc/)\n[![PyPI - Status](https://img.shields.io/pypi/status/xml2rfc)](https://pypi.org/project/xml2rfc/)\n[![PyPI - Format](https://img.shields.io/pypi/format/xml2rfc)](https://pypi.org/project/xml2rfc/)\n    \n##### Generate RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies\n    \n</div>\n\n- [Changelog](https://github.com/ietf-tools/xml2rfc/blob/main/CHANGELOG.md)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md)\n- [Getting Started](#getting-started)\n    - [Git Cloning Tips](#git-cloning-tips)\n    - [Docker Dev Environment](#docker-dev-environment)\n- [Release Procedure](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md#release-procedure)\n\n---\n\n### Introduction\n\nThe [IETF] uses a specific format for the standards and other documents it publishes as [RFCs], and for the draft documents which are produced when developing documents for publications. There exists a number of different tools to facilitate the formatting of drafts and RFCs according to the existing rules, and this tool, **xml2rfc**, is one of them. It takes as input an xml file that contains the text and meta-information about author names etc., and transforms it into suitably formatted output. The input xml file should follow the grammars in [RFC7749] *(for v2 documents)* or [RFC7991] *(for v3 documents)*. Note that the grammar for v3 is still being refined, and changes will eventually be captured in the [bis draft for 7991]. Changes not yet captured can be seen in the xml2rfc source [v3.rng], or in the [documentation xml2rfc produces] with its `--doc` flag.\n\n**xml2rfc** provides a variety of output formats. See the command line help for a full list of formats. It also provides conversion from v2 to v3, and can run the [preptool] on its input.\n\n### Installation\n\nInstallation of the python package is done as usual with `pip install xml2rfc`, using appropriate switches.\n\n#### Installation of support libraries for the PDF-formatter\n\nIn order to generate PDFs, **xml2rfc** uses the [WeasyPrint] module, which depends on external libraries that must be installed as native packages on your platform, separately from the **xml2rfc** install.\n\n1. First, install the **Pango**, and other required libraries on your system.  See installation instructions on the [WeasyPrint Docs].\n\n2. Next, install WeasyPrint python modules using pip.\n\n```sh\npip install \"xml2rfc[pdf]\"\n```\n3. Finally, install the required fonts:\n  * Download latest fonts from [xml2rfc-fonts](https://github.com/ietf-tools/xml2rfc-fonts/releases/latest).\n  * In the **Assets** section, download either the `tar.gz` or the `zip` archive.\n  * Extract the contents of the downloaded `xml2rfc-fonts` archive.\n  * Install the fonts found in the `noto` and `roboto_mono` directories to your operating system.\n\nWith these installed and available to **xml2rfc**, the `--pdf` switch will be enabled.\n\n### Usage\n\n**xml2rfc** accepts a single XML document as input and outputs to one or more conversion formats.\n\n#### Basic Usage\n\n```sh\nxml2rfc SOURCE [options] FORMATS...\n```\n\nRun `xml2rfc --help` for a full listing of command-line options.\n\n### Getting Started\n\nThis project is following the standard **Git Feature Workflow** development model. Learn about all the various steps of the development workflow, from creating a fork to submitting a pull request, in the [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md) guide.\n\n> Make sure to read the [Styleguides](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md#styleguides) section to ensure a cohesive code format across the project.\n\nYou can submit bug reports, enhancements and new feature requests in the [discussions](https://github.com/ietf-tools/xml2rfc/discussions) area. Accepted tickets will be converted to issues.\n\n#### Git Cloning Tips\n\nAs outlined in the [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md) guide, you will first want to create a fork of the xml2rfc project in your personal GitHub account before cloning it.\n\nFor example *(replace `USERNAME` with your GitHub username)*:\n\n```sh\ngit clone https://github.com/USERNAME/xml2rfc.git\n```\n#### Docker Dev Environment\n\nRun `./run.sh` command to build and start a docker development environment.\nThe initial build may take time because it downloads all required fonts as well.\n\n\n```sh\n./run.sh\n```\n\n[IETF]: https://www.ietf.org/\n[RFCs]: https://www.rfc-editor.org/\n[RFC7749]: https://www.rfc-editor.org/info/rfc7749\n[RFC7991]: https://www.rfc-editor.org/info/rfc7991\n[bis draft for 7991]: https://datatracker.ietf.org/doc/draft-iab-rfc7991bis/\n[v3.rng]: xml2rfc/data/v3.rng\n[documentation xml2rfc produces]: https://ietf-tools.github.io/xml2rfc/\n[preptool]: https://www.rfc-editor.org/info/rfc7998\n[WeasyPrint]: https://weasyprint.org/\n[WeasyPrint Docs]: https://doc.courtbouillon.org/weasyprint/stable/first_steps.html\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License\n        \n        Copyright (c) 2022, IETF Trust\n        All rights reserved.\n        \n        Redistribution and use in source and binary forms, with or without\n        modification, are permitted provided that the following conditions are met:\n        \n        1. Redistributions of source code must retain the above copyright notice, this\n           list of conditions and the following disclaimer.\n        \n        2. Redistributions in binary form must reproduce the above copyright notice,\n           this list of conditions and the following disclaimer in the documentation\n           and/or other materials provided with the distribution.\n        \n        3. Neither the name of the copyright holder nor the names of its\n           contributors may be used to endorse or promote products derived from\n           this software without specific prior written permission.\n        \n        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n        ",
    "summary": "xml2rfc generates RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies.",
    "version": "3.27.0",
    "project_urls": {
        "changelog": "https://github.com/ietf-tools/xml2rfc/blob/main/CHANGELOG.md",
        "documentation": "https://ietf-tools.github.io/xml2rfc/",
        "homepage": "https://github.com/ietf-tools/xml2rfc",
        "issues": "https://github.com/ietf-tools/xml2rfc/issues",
        "releasenotes": "https://github.com/ietf-tools/xml2rfc/releases",
        "source": "https://github.com/ietf-tools/xml2rfc"
    },
    "split_keywords": [
        "ietf",
        " rfc",
        " id",
        " internet-draft",
        " xml",
        " xml2rfc",
        " xmlrfc"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e9c872101065dddcc97cf19fb506e710e6ab23763cee5a3193c0500b23e664cb",
                "md5": "5fa19b7fca126e6db5d3cd3c2c18c644",
                "sha256": "b892c9b556c9a5a3e320b6911ca514ce2eed58e494ffb918f3739a261bd0678c"
            },
            "downloads": -1,
            "filename": "xml2rfc-3.27.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5fa19b7fca126e6db5d3cd3c2c18c644",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 382174,
            "upload_time": "2025-02-07T00:05:12",
            "upload_time_iso_8601": "2025-02-07T00:05:12.539684Z",
            "url": "https://files.pythonhosted.org/packages/e9/c8/72101065dddcc97cf19fb506e710e6ab23763cee5a3193c0500b23e664cb/xml2rfc-3.27.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "99ad471803a489c93804239986c64b0b3ae3b5b898e367fff5418739e7e7622b",
                "md5": "a25cb81a78b8b58eb5ba47a9878e85f0",
                "sha256": "b537b0eb3ea3492adc6b1eb01acfe849037c2080e1453c3eba9129dcceb1ed7a"
            },
            "downloads": -1,
            "filename": "xml2rfc-3.27.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a25cb81a78b8b58eb5ba47a9878e85f0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 423236,
            "upload_time": "2025-02-07T00:05:15",
            "upload_time_iso_8601": "2025-02-07T00:05:15.925292Z",
            "url": "https://files.pythonhosted.org/packages/99/ad/471803a489c93804239986c64b0b3ae3b5b898e367fff5418739e7e7622b/xml2rfc-3.27.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-07 00:05:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ietf-tools",
    "github_project": "xml2rfc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "xml2rfc"
}
        
Elapsed time: 0.38225s