Graeme's Wiki

fpdoc usage summary
If you are not very familiar with fpDoc, this article is for you. I'll cover the basics.

Lets say you have no documentation, just your source code. You need to use the tool called makeskel which will generate skeleton XML description files of each source code unit. The XML layout is quite a flat hierarchy so is easy to edit with a plain editor (if needed).

Now to actually write the documentation (which will live in the XML files) you can use one of three tools.

  1. A plain editor - handy in a pinch or for quick fixes or when you know the fpDoc syntax.

  2. lazde - located in the lazarus\doceditor directory. It's a external full featured tool to edit the XML files. It has many features to help you and toolbar buttons to insert syntax formatting in the descriptions. To edit a XML file you select File|Open and select the XML file of interest.

  3. LazDoc - part of the Lazarus IDE and can be open by selecting View|LazDoc Editor . To edit the documentation with this editor, you first need to tell the Lazarus IDE where to find the XML documents. You do this by going to Project|Project Options|LazDoc tab . Add the path(s) to the XML files. Now you are ready to document your code. Simply place the cursor in the editor window on a Method, Class, Parameter etc. and the LazDoc editor will be ready to accept your documentation content. I believe it auto saves when you move the cursor to another identifier.

Once you have some documentation written in the XML files (though you can do this step with skeleton XML files as well) you can run fpdoc to generate many HTML output files which will be the final formatted documentation.

For examples on how to use makeskel or fpdoc , you can read the PDF documentation on fpDoc. You can also look in the Docs directory of the tiOPF project for script examples.

I hope this information will get you started with fpDoc.