[fpc-pascal] fpdoc project file: multiple output formats

Graeme Geldenhuys graeme at geldenhuys.co.uk
Mon Apr 29 18:36:39 CEST 2013


I'm using a fpdoc project file for fpGUI documentation. The project file
idea works much better than a massive set of command line parameters. So
kudos to whoever thought of the project file idea.

I just have one question though.... Can the project file manage two or
more output formats? It is often the case that one will generate say
INF, CHM, HTML etc docs. So how is the project file supposed to be setup
for say INF and HTML output?

At the moment I have commented lines which I have to copy and paste
depending on the output format.

My workflow goes something like this.

 1) I want to generate IPF output. I copy and paste the commented IPF
    settings in the fpdoc project file and overwrite some active (not
    commented) lines. eg: the <package> line and some <option> lines.
 2) Run fpdoc
 3) I want to generate HTML output. I copy and paste the commented HTML
    settings in the fpdoc project file and overwrite some active (not
    commented) lines. eg: the <package> line and some <option> lines.
 4) Run fpdoc
 5).... repeat for whatever formats I want.

Does fpdoc project file (maybe in 2.6.3 or 2.7.1) support multiple
options that only relate to specific output formats?


  <options format="ipf">
    <option output="fpgui.ipf">
    <option name="hide-protected" value="true"/>
    <option name="duplinkeddoc" value="true"/>

  <options format="html">
    <option output="html/" contentfile="fpgui.cnt">
    <option name="hide-protected" value="true"/>
    <option name="footer-date" value="yyyy-mm-dd"/>

  <options format="chm">
    <option output="fpgui.chm" contentfile="fpgui.cnt">
    <option name="hide-protected" value="true"/>

Maybe the 'output' and 'contentfile' attributes could maybe be part of
the <options> tag, instead of the <option> tag.

If this (or something similar) is not currently possible, then I guess I
have to continue working as I am now - copy & paste. The alternative, is
to have separate project files for each output format, but then you get
the issue of having to remember to sync <unit> and <description> lines
if any other project files change.

If you are unclear of what I am trying to say or ask, here is my fpdoc
project file for fpGUI. Note the commented lines at the top and bottom
of the XML file.


  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the fpc-pascal mailing list