The purpose of this tool is to automate api documentation generation from the source code itself. DocGen avoids having to completely compile the source and reading the metadata as it uses an AST parser for each supported language.
Languages currently supported are:
- C
- For C - you can pass dependencies to the
--dependenciesarguments. If you need compilation symbols, you can pass the symbol you need to the--argsarguments.
- For C - you can pass dependencies to the
- C#
- Simply parses without needing to provide all of the dependencies.
Many tools such as
can already do what DocGen does, but they emit primarily html files or read existing markdown files
to generate an entire documentation website.
DocGen generates markdown files after reading the source files. This works for static website generators such as hugo or jekyll. There is no theme provided by docgen. Themes are entirely provided by whatever your static website generator uses.
- Scriban
- CppAst.NET
- Roslyn
- CommandLine
- .NET 10
dotnet restore
dotnet build -c Release
dotnet publish -c Release
Description:
DocGen - Documentation Generator for Markdown Files
Usage:
docgen [options]
Options:
-p, --path <path> (REQUIRED) Path to the source files. Currently supports *.cs and *.h files.
-o, --output <output> (REQUIRED) Where to write the generated markdown files to.
-l, --lang <lang> (REQUIRED) What programming language can are we parsing?
-a, --args <args> What additional arguments to provide. For example, for C based
projects, you may need compilation arguments. Multiple
args can be provided split by whitespaces.
--d, --dependencies <dependencies> Provide any dependencies needed for compilation to happen for
C. CSharp does not require this.
-?, -h, --help Show help and usage information
--version Show version informationCurrently only C and C# are supported languages.
docgen -p path_to_src_dir -o path_to_output_dir --lang csharp