Package: xml2rfc
Generate RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabulariesChangelogInstallationUsageContributingGetting StartedGit Cloning TipsDocker Dev EnvironmentRelease ProcedureIntroductionTheIETFuses a specific format for the standards and other documents it publishes asRFCs, 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 inRFC7749(for v2 documents)orRFC7991(for v3 documents). Note that the grammar for v3 is still being refined, and changes will eventually be captured in thebis draft for 7991. Changes not yet captured can be seen in the xml2rfc sourcev3.rng, or in thedocumentation xml2rfc produceswith its--docflag.xml2rfcprovides 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 thepreptoolon its input.InstallationInstallation of the python package is done as usual withpip install xml2rfc, using appropriate switches.Installation of support libraries for the PDF-formatterIn order to generate PDFs,xml2rfcuses theWeasyPrintmodule, which depends on external libraries that must be installed as native packages on your platform, separately from thexml2rfcinstall.First, install thePango, and other required libraries on your system.  See installation instructions on theWeasyPrint Docs.Next, install WeasyPrint python modules using pip.pipinstall'weasyprint>=53.0,!=57.0,!=60.0'Finally, install the fullNoto FontandRoboto Monopackages:Download the full font file from:https://noto-website-2.storage.googleapis.com/pkgs/Noto-unhinted.zipFollow the installation instructions athttps://www.google.com/get/noto/help/install/Go tohttps://fonts.google.com/specimen/Roboto+Mono, and download the
font. Follow the installation instructions above, as applied to this download.Go tohttps://fonts.google.com/noto/specimen/Noto+Sans+Math, and
download the font. Follow the installation instructions above, as
applied to this download.With these installed and available toxml2rfc, the--pdfswitch will be enabled.Usagexml2rfcaccepts a single XML document as input and outputs to one or more conversion formats.Basic Usagexml2rfcSOURCE[options]FORMATS...Runxml2rfc --helpfor a full listing of command-line options.Getting StartedThis project is following the standardGit Feature Workflowdevelopment model. Learn about all the various steps of the development workflow, from creating a fork to submitting a pull request, in theContributingguide.Make sure to read theStyleguidessection to ensure a cohesive code format across the project.You can submit bug reports, enhancements and new feature requests in thediscussionsarea. Accepted tickets will be converted to issues.Git Cloning TipsAs outlined in theContributingguide, you will first want to create a fork of the xml2rfc project in your personal GitHub account before cloning it.For example(replaceUSERNAMEwith your GitHub username):gitclonehttps://github.com/USERNAME/xml2rfc.gitDocker Dev EnvironmentRun./run.shcommand to build and start a docker development environment.
The initial build may take time because it downloads all required fonts as well../run.sh