0

I recently upgraded to phpdoc 2 and want to create a solution for outputting my api to wiki markup, instead of html or pdf.

In /usr/share/php5/data/PhpDocumentor/Converters, I see the CHM, HTML, PDF, and XML folders. Is it possible to create a WIKI folder and put the configuration files in there?

Nemo
  • 2,441
  • 2
  • 29
  • 63
Brett
  • 149
  • 13
  • What wiki are you talking about? I see there are both Confluence and MediaWiki tags, but those wiki engines have very different markup. – Nemo Nov 07 '15 at 09:46

1 Answers1

0

You can indeed store your custom output converter there, but you'll also need to write a custom extended Converter class -- http://manual.phpdoc.org/HTMLSmartyConverter/HandS/li_Converters.html

ashnazg
  • 6,558
  • 2
  • 32
  • 39
  • i'm confused. in phpDocumentor 1, you used to have an output flag option which you could pass for example, HTML::default::default. With phpDocumentor 2, the --output flag is no longer available. You now seem to have a template flag, for example "responsive". So, my questions are: 1. How do I create a template that just formats output to be wiki syntax, no HTML. 2. Where would this template need to exist so I could call it from a command line? The documentation for phpDocumentor 2 is scarse, and there are no examples out there for what I'm trying to do. – Brett Nov 28 '12 at 16:29
  • Ah, phpdoc2... then you want to read (http://www.phpdoc.org/docs/latest/for-template-builders/introduction/welcome-to-the-template-guide.html) for guidance on writing your own output template. Those folders you see in /usr/share/php5/data/PhpDocumentor/Converters are files from phpdoc1... they are not used by phpdoc2 at all. Short answer is yes, you can create what your after... see the template builder guide I reference above. – ashnazg Nov 28 '12 at 16:35
  • So I dropped back to phpdoc version 1 where I basically copied and pasted the CHM folder and renamed it WIKI, and call WIKI::Confluence::default an output option. What I want to do now is to manipulate the documentation so that each file (class) becomes its own .wiki page with all the class api info marked up in Confluence wiki syntax (or Mediawiki). The CHMdefaultConverter.inc file is huge and has tons of templates for building an index tree and more. I dont need all that. Just looking to output individual pages in wiki markup. Ideas? – Brett Nov 28 '12 at 21:36
  • If attempting this myself, I'd probably try starting with the HTML:default:default template instead. The visible HTML markup in the template files would be easier for me to mentally translate "this HTML tag becomes this wiki syntax". You want to be sure not to lose any of the placeholders... unless of course the data the placeholder contains is something you decide you don't want to include in your output. – ashnazg Nov 30 '12 at 14:07
  • Good point. The tricky part is making sense of the HTMLframesConverter.inc file and modifying it to produce the desired output. I guess i'll just start with small modifications until it starts to make more sense. I'll continue to post my findings in case someone else is looking for a similar solution. – Brett Nov 30 '12 at 19:10
  • The page (https://www.phpdoc.org/docs/latest/for-template-builders/introduction/welcome-to-the-template-guide.html) linked above does not exist as of today. – Jay Bienvenu Aug 07 '17 at 14:03