Can fpdoc insert macro values or compiler version information?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Can fpdoc insert macro values or compiler version information?

Graeme Geldenhuys-6
Hi,

Does FPDOC have the ability to inject the compiler version into RTL and
FCL documentation? Something like FPC's macro variables or something.
eg: in the RTL Package Overview contents?

eg:
  Inside the "Description" content of this page:

    https://www.freepascal.org/docs-html/rtl/


The reason I ask, is because some output formats of fpdoc doesn't
contain the FPC version it relates to. In fact, only the PDF
documention, and I think that is accomplished manually via a LaTeX template.

If I look at the content of the above URL, no version number is
mentioned. If I look at INF or CHM generated documentation of the RTL or
FCL, the same problem exists. One can't determine which FPC version
those docs relate too.

Thinking about this a bit more, if fpdoc had (or has) the ability to do
macro variable replacements when generating documentation, macro values
or definitions could be passed via the command line, and such
information inserted in all documentation of various libraries and
frameworks that use fpdoc to generate class documentation. eg: the
version of the fpGUI's INF file, or the version of the LCL.chm file etc.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can fpdoc insert macro values or compiler version information?

Michael Van Canneyt


On Wed, 3 May 2017, Graeme Geldenhuys wrote:

> Hi,
>
> Does FPDOC have the ability to inject the compiler version into RTL and
> FCL documentation? Something like FPC's macro variables or something.

No, because it does not know this information. It has no way of knowing.
At best it knows the version of FPC that fpdoc itself was compiled with.

But that doesn't necessarily equal the version of the compiler used to
compile the units with.

> eg: in the RTL Package Overview contents?
>
> eg:
>  Inside the "Description" content of this page:
>
>    https://www.freepascal.org/docs-html/rtl/
>
>
> The reason I ask, is because some output formats of fpdoc doesn't
> contain the FPC version it relates to. In fact, only the PDF
> documention, and I think that is accomplished manually via a LaTeX template.
>
> If I look at the content of the above URL, no version number is
> mentioned. If I look at INF or CHM generated documentation of the RTL or
> FCL, the same problem exists. One can't determine which FPC version
> those docs relate too.
>
> Thinking about this a bit more, if fpdoc had (or has) the ability to do
> macro variable replacements when generating documentation, macro values
> or definitions could be passed via the command line, and such
> information inserted in all documentation of various libraries and
> frameworks that use fpdoc to generate class documentation. eg: the
> version of the fpGUI's INF file, or the version of the LCL.chm file etc.

I deliberately do not wish to support this.

It would require preprocessing the whole file before it is fed to the XML engine.
So this kind of things can then equally well be done using some specialized preprocessor;
m4 or sed or so.

An alternative could be to use a special footer template in the generated HTML.
We have this for generating the date or a search box. This could be used to
insert a version number on each page.

Patches that automate this approach in the documentation are welcome.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can fpdoc insert macro values or compiler version information?

Graeme Geldenhuys-6
On 2017-05-03 17:44, Michael Van Canneyt wrote:
> No, because it does not know this information. It has no way of knowing.
> At best it knows the version of FPC that fpdoc itself was compiled with.

I thought that much [after I sent my email].


> I deliberately do not wish to support this.
>
> It would require preprocessing the whole file before it is fed to the XML engine.


True, and that could slow things down a lot or cause other side
effects.

Thanks for the reply. I'll give this some more thought and see if I can
up up with an alternate solution.


Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Loading...