hgen generates documentation for source code on D.

Usage:
    hgen [options] <file.d>
    hgen [options] <directory1> <directory2> ...
    hgen -C <style.css>
    hgen --version
    hgen --help

If the file 'hgen.cfg' exists in the current directory, the configuration
written in it will be used in the program. On GNU/Linux, the configuration
can be stored in '~/.config/hgen/hgen.cfg'. The configuration parameters
correspond to the available command line parameters.

Examples:

    hgen source
        Write documentation for source code in 'source/' to 'doc/'.
        If file 'hgen.cfg' exists, load more configuration options from there.

    hgen source -o doc/api
        Write documentation for source code in directory 'source' to 'doc/api'.

    hgen -g
        Generate default configuration file as 'hgen.cfg'

    hgen -C style.css
        Generate default CSS style as 'style.css'

    hgen source -c style.css -e package1.module -e package2 -i index.ddoc
        Write documentation for source code in directory 'source' to 'doc',
        using CSS style 'style.css' and main page content from 'index.ddoc',
        but don't generate documentation for module 'package1.module' and
        package 'package2'.

Options:

    --help | -h
        Prints this message.

    --version
        Prints the current version of the program.

    --performance
        Prints work time and peak memory usage.

    --output-directory | -o DIR
        Writes the generated documentation to the given directory. If this
        option is not specified, documentation will be written to a folder
        called "doc" in the current directory.

    --exclude | -e MODULE_NAME
        Exclude given module or package from the generated documentation.
        By default no modules or packages will be excluded unless they do not
        contain a module declaration.

        Example: '-e tharsis.util -e tharsis.entity.componentbuffer'
        This will exclude package tharsis.util and module
        tharsis.entity.componentbuffer.

    --project-name | -p NAME
        Name of the project. Used on the main page and possibly other places
        to help identify the project.
        Default: <no name>

    --project-version | -n VERSION
        Version of the project. Used on the main page and possibly other places
        to help identify the project.
        Default: <no version>

    --no-markdown | -D
        Disable Markdown support. Only DDoc will be used.

    --index | -i DDOC_MD_FILE
        Use DDOC_MD_FILE as the content of the index.html page.

    --toc-additional | -t DDOC_MD_FILE
        Use DDOC_MD_FILE as additional content of the table of contents.
        Can be used more than once.

    --toc-additional-direct | -T CONTENT
        Use string CONTENT (ddoc and/or markdown) as additional content of the
        table of contents. Can be used more than once.

    --generate-cfg | -g
        Generate the default configuration file and write it into 'hgen.cfg'. 
        This file can be used to store configuration options instead of passing
        them through the command line.
        See also: --config
    
    --generate-cfg-linux
        Write the default configuration file into "~/.config/hgen/hgen.cfg".
        By default, hgen loads configuration from this file
        if 'hgen.cfg' does not exist in the current directory.
        This option is relevant only for GNU/Linux.

    --css | -c CSS_FILE
        Use CSS_FILE to style the documentation instead of using default CSS.
        See also: --generate-css

    --generate-css | -C CSS_OUT_FILE
        Generate default CSS file and write it to CSS_OUT_FILE. This file can
        be modified and then passed using the --css option.

    --config | -F CONFIG_FILE
        Load hgen configuration from specified file.
        By default, hgen loads configuration from './hgen.cfg',
        if such a file exists.

        Note that any configuration option specified in the config file is
        overridden if the same option is specified as a command-line
        argument.

    --macros | -m MACRO_FILE
        Specifies a DDoc macro definition file to use. Multiple macro files
        can be used by using this option more than once.

    --max-file-size | -M KIBIBYTES
        Specifies maximum file size of D modules hgen will process.
        Any file bigger than KIBIBYTES kiB will be ignored. Useful in rare
        cases when modules are huge enough that the parser spends too much
        memory.
        Default: 16384 (16MiB)

    --max-module-list-length | -l COUNT
        Maximum number of modules to generate module list for.
        Default: 256.
