GitXplorerGitXplorer
g

doxy2man

public
10 stars
5 forks
1 issues

Commits

List of commits on branch master.
Unverified
5ce113f4d2a3fc6712f8eb8606a6b0899dc6f8d1

add example + reference output

ggsauthof committed 8 years ago
Unverified
7e36a2cfa0200b7d6c668dd57f78ab4cf438533b

also print argument strings in a struct

ggsauthof committed 8 years ago
Unverified
4d6a7dfd3e53f3edc2508c078c309eccd44cc8f3

Add GPLv3+ license file. This closes #2.

ggsauthof committed 10 years ago
Unverified
9d21a47decf6f37be6eb2a7a163f9685a52ebea0

Merge pull request #1 from nmav/master

ggsauthof committed 10 years ago
Unverified
3ba244b94500d6bde92582efb1ce205e163690bc

include a manpage for doxy2man

committed 10 years ago
Unverified
8332014a20a76859f2ca13ff98133a6d75d70f3d

update build instructions, tested platforms in README

ggsauthof committed 11 years ago

README

The README file for this repository.

doxy2man

Create man pages from doxygen XML output.

Rationale

Doxygen is great for generating HTML based API documentation. But the man page output mode of doxygen (GENERATE_MAN = YES) is not that awesome. Doxygen generates for a header file a man page with all functions, enums etc. For each structure it generates a man page listing all its (public) attributes. For C based projects this is not very useful, because one usually expects things like one man page for each function and referenced structs documented where used.

Doxy2man takes the XML generated by Doxygen as input and creates several man pages from that. It creates a summary man page for a header and for each function a detailed man page. The output is optimized for C projects. It supports the most common doxygen features, e.g. implicit and explicit see also tags, copyright, author information, brief and detailed descriptions, etc.

Compile

Doxy2man is written in C++ and uses the Qt library (I tested it with version 4.8 and 5.2). You can build it like this:

$ qmake-qt4
$ make

Or:

$ qmake-qt5
$ make

To build the manpage use:

$ make doxy2man.8

Usage

Create a small Doxygen configuration file. To enable XML output use something like this:

GENERATE_XML           = YES
XML_OUTPUT             = xml
XML_PROGRAMLISTING     = NO

Call doxygen:

$ doxygen

The xml subdirectory should contain some XML files now.

Call doxy2man:

$ ./doxy2man xml/myheader_8h.xml

View the man pages:

$ ls out
...
$ man -l out/my_header.h.3
$ man -l out/my_func_a.3
$ man -l out/my_func_b.3
...

Example

See also the example subdirectory:

  • generate.sh - executes doxygen and doxy2man
  • omg.h - a toy header
  • out/ - man pages generated for omg.h by doxy2man 0.3
  • Doxyfile - default configuration generated by doxygen 1.8.11 (and modified by generate.sh)

Options

Doxy2man implements several useful defaults but is also customizable:

$ ./doxy2man --help
Generates man pages from doxygen XML output

call: ./doxy2man OPTIONS DOXYGEN_XML_HEADER_FILE

where

-h,     --help           this screen
        --nowarn         suppress warnings
        --nosummary      don't generate summare man page
        --nocopyright    don't generate copyright section
        --nofollow       don't parse referenced xml files
        --novalidate     don't validate xml files against compound.xsd
        --noseealsoall   don't add all functions under see also
        --nosort         don't sort functions under see also
        --nostructs      don't print structs in function man pages
-o DIR, --out DIR        output directory
-s STR, --section STR    man page section
        --short-pkg STR  short man page header/footer string, e.g. 'Linux'
        --pkg STR        man page header/footer string, e.g. 'Linux Programmer's Manual'
-i STR, --include STR    include path prefix

Contact

Georg Sauthoff mail@georg.so

Don't hesitate to mail questions, comments or other feedback.

Tested platforms

Qt libraries:

  • Qt 4.8
  • Qt 5.2

Operating systems:

  • Fedora Linux 17, 19 (x86/64)
  • Solaris 10/SPARC

License

GPLv3+