Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get plain text files in Doxygen documentation?

Tags:

I cannot include any text file in my Doxygen documentation. The only exception is a README.md file that I set as the main page.

In particular, I would like to see the Changelog.txt file in the documentation. I tried to add it explicitly in the INPUT field and in the FILE_PATTERNS field, without success. In the generated HTML documentation, I cannot find anything neither in the file list nor making a search.

The only trace is in Doxygen's log file:

Preprocessing C:/Source/Changelog.txt...
Parsing file C:/Source/Changelog.txt...
...
Parsing code for file Changelog.txt...

If I change the extension of the file from txt to md, the file is added to the documentation.

like image 355
Pietro Avatar asked May 05 '17 11:05

Pietro


People also ask

How do I add files to doxygen?

Just list your custom files in the INPUT macro in your doxyfile. You can choose whatever name you find appropriate. Format is text with Doxygen tags.

Can doxygen generate markdown?

Including Markdown files as pagesDoxygen can process files with Markdown formatting. For this to work the extension for such a file should be . md or .

How do I exclude a file in doxygen?

How can I make doxygen ignore some code fragment? The new and easiest way is to add one comment block with a \cond command at the start and one comment block with a \endcond command at the end of the piece of code that should be ignored. This should be within the same file of course.


1 Answers

You need EXTENSION_MAPPING=txt=md otherwise the .txt file is handled as a C / C++ source file and it is missing comment signs, resulting in no output.

From the documentation:

EXTENSION_MAPPING Doxygen selects the parser to use depending on the extension of the files it parses. With this tag you can assign which parser to use for a given extension. Doxygen has a built-in mapping, but you can override or extend it using this tag. The format is ext=language, where ext is a file extension, and language is one of the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: Fortran. In the later case the parser tries to guess whether the code is fixed or free formatted code, this is the default for Fortran type files), VHDL. For instance to make doxygen treat .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note: For files without extension you can use no_extension as a placeholder. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.

like image 56
albert Avatar answered Oct 11 '22 09:10

albert