开发者

How to convert AsciiDoc to Perl POD?

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

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜