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)).

有帮助吗?

解决方案

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).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top