Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miekg/pandoc2rfc
Use pandoc to create XML suitable for xml2rfc
https://github.com/miekg/pandoc2rfc
Last synced: about 2 months ago
JSON representation
Use pandoc to create XML suitable for xml2rfc
- Host: GitHub
- URL: https://github.com/miekg/pandoc2rfc
- Owner: miekg
- License: other
- Archived: true
- Created: 2011-09-13T07:11:17.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2019-09-27T12:47:09.000Z (almost 5 years ago)
- Last Synced: 2024-06-10T00:35:45.264Z (3 months ago)
- Language: Python
- Homepage: https://tools.ietf.org/html/rfc7328.html
- Size: 505 KB
- Stars: 81
- Watchers: 10
- Forks: 23
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NOTE NOTE
Pandoc2rfc will not be able to generate XML2RFC v3 documents, as pandoc syntax
lacks the power to do so. For this reason [mmark](https://github.com/miekg/mmark)
exists.# README
Pandoc2rfc translates text written in the Markdown variant Pandoc to documents
in xml2rfc format. It's an easy way to write RFCs.The documentation for Pandoc2rfc can be found at:
.> Note that I consider [mmark](https://github.com/miekg/mmark) the logical successor of Pandoc2rfc.
> Pandoc2rfc can't output XML2RFC v3 XML, so when the IETF switches over to that format, you'll
> need something else. Mmark can output v3 (and v2 for that matter).## Differences with Pandoc
Although you can type Pandoc just fine, there are two things that differ
* Using Pandoc citations is not supported, you must use internal references
for this;
* Referencing figures and tables is done by abusing inline footnotes, which are
typeset directly after the figure or table. Like so:^[tab:simple::Demonstration of **simple** table syntax.]
Where `tab:simple` will be the anchor and the text after `::` as used for the title.
* List with `style=format REG%d` are typeset with strikethrough text in the
first element, as such:1. ~~REQ%d~~ First REQ1 item;
2. Second REQ2 item.* An index is done by (yet again) by using a foonote, but the first item is a superscript:
^[ ^list^ format styles]
The rest of the content is the "subitem"
As said, more extensive docs are here:
.
But after some setup, it is *just* typing Pandoc syntax in $EDITOR.## Bare install
Just copy `transform.xsl` and `template.xml` to your I-D directory. Modify
`template.xml` according to your needs and run:pandoc -t docbook -s .mkd | \
xsltproc --nonet transform.xsl - > .xmlAnd to create a draft.txt
xml2rfc template.xml -f draft.txt --text
And/or create a Makefile.
## Packages
Or you can install `Pandoc2rfc` on your system. Then copy `template.xml`
to your I-D directory. Modify according to your needs and run:pandoc2rfc *.mkd
Packages can be found for Debian/Ubuntu at:
, they should also install
in previous Ubuntu versions.Or see for proper Debian packages.
## XSLT 1.0
Note that you don't even need `xsltproc` per se, just an XSLT transformer
program. Also note that only `xsltproc` is tested.Pandoc2rfc v2 works with `xml2rfc` version 2.x.
Miek Gieben - 2012