Question

How to convert manpage written in AsciiDoc lightweight markup language automatically into Perl's POD (Plain Old Documentation)?

Perhaps something that converts from DocBook to POD (the conversion from AsciiDoc sources to manpage format i.e. troff goes via DocBook (via XML)).

Était-ce utile?

La solution

You should be able to accomplish this using a2x and rman, to first convert asciidoc to man page format, then to convert that to POD:

a2x -f manpage foo.1.txt
groff -e -mandoc -Tascii foo.1 | rman -f POD > foo.pod

The groff command is there to fix some formatting issues -- apparently rman does not understand specific macros produced by a2x (I found this piece of advice on this page: http://www.datastat.com/sysadminjournal/misctips.html).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top