tags:

views:

522

answers:

3

My company is working on end user/developer docs using mediawiki. I'd like to take a lot of the API docs that phpdoc spit out (for specific functions/methods) and have it in wiki markup for easy transfer.

Any solutions out there for getting wiki markup or wiki output from phpDoc? I've looked around and found nothing.

A: 

One option (off the top of my head) is to use the API build in to MediaWiki, and post the data yourself. (via script, of course).

The only other way would be to hack phpDoc, and even then, you'd have to post it to MediaWiki somehow.

gms8994
+1  A: 

According to the PHPDocumentor website and their documentation HTML and XML output is possible. You can then import the XML using the built-in import features of MediaWiki though you may want to export first to look at what the format of the XML is. They also mention that using XML to import large amounts of data can lead to timeouts and have an alternative which allows you to create SQL queries to insert the data. Also you'll probably need an extension for MediaWiki to show code (something like SyntaxHighlight GeSHi).

All this doesn't really explain how to convert the output of PHPDocumentor into something usable with MediaWiki (ie using Wiki syntax). Most likely you'll be using scripts to convert one syntax to the other. It looks like creating your own output format via PHPDocumentor is the easiest way (though outputting as XML:DocBook may work).

nevets1219
You can also convert one XML document to differently-structured XML using an XSLT script. Quite handy, and has good performance.
Bill Karwin
A: 

Just came across this while looking for a way to generate Twiki output from phpDoc. I haven't found a good solution for this either and have started a project here: http://step2.co.in/content/phpdoc-twiki to get work started on this. If anybody's interested in helping out, please get in touch.

Rahul Jha