I've finally figured out a way to convert perldoc output into mediawiki format so that I could easily add it to the wiki for the
Qpsmtpd Plugins.
Steps to re-create:
* Install 'pandoc' from the
epel repository* Use perldoc to generate html, then pipe that through pandoc to create mediawiki format
* clean up the output:
* add an anchor at the top so that heading links work
* add a link back to Qpsmtpd#Plugins
* remove the closing </dd>, </dl> and </dt> tags that mediawiki does not handle properly
The resulting command looks like this:
perldoc -T -ohtml /usr/share/qpsmtpd/plugins/naughty |pandoc -f html -t mediawiki |sed 1 i\\n\n\n<span id="_top">[[Qpsmtpd#Plugins]]</span> |sed -e s#</d.>##
So far I've only done 3 plugins in case the format can be improved. Suggestions welcome.
https://wiki.contribs.org/Qpsmtpd:naughtyhttps://wiki.contribs.org/Qpsmtpd:authhttps://wiki.contribs.org/Qpsmtpd:helo