Skip to content

Convert text-format RFCs and Internet-Drafts to html

License

Notifications You must be signed in to change notification settings

ietf-tools/rfc2html

RFC2HTML

Release License PyPI - Version PyPI - Status PyPI - Format

Htmlizing IETF Text Documents

Usage

This module contains one single function, markup(text) which adds HTML markup to what is assumed to be an IETF document (usually an Internet-Draft or an RFC):

from rfc2html import markup
with open('rfc3344.txt') as file:
    text = file.read()
html = markup(text)

History

As a historic artifact of being a document series which was started at the time when the easiest way of distributing a Request For Comments was to type it up on a typewriter and mimeographing it, RFCs and Internet-Drafts before RFC 8650 were published as plaintext documents with a maximum line length of 72 characters. Some Internet-Drafts are still created only in this form.

This format isn't particularly appropriate in a web-centric world, howerver, so starting in 2002, Henrik Levkowetz started using scripts to convert the plaintext documents into HTML documents with the same look-and-feel as the plaintext originals, but with internal and external HTML links in order to facilitate browsing.

Henrik served the resulting documents at tools.ietf.org starting in 2004. These are now served from the IETF Datatracker.

This module began as a packaging of the htmlization code from version 1.113 of the htmlizing script.