mdoc-assemble(1)
β¨ NAME β¨
okay so bestie, welcome to mdoc-assemble(1) β the General Commands Manual page that's literally about mdoc assemble, the lil command that compiles documentation for use in monodoc(1). yes that's the whole name. short, sweet, iconic π
πΈ SYNOPSIS πΈ
mdoc assemble [OPTIONS]+ PATHS+
π¦ DESCRIPTION π¦
so mdoc assemble creates .tree and .zip files out of your PATHS, and those are for the monodoc(1) documentation browser. giving very much "build my docs pls" energy β¨
the input files must have a supported format, and you tell it which one with the --format option.
the .tree and .zip files get copied into monodoc's sources directory, right alongside a .source file β and that .source file is what monodoc(1) uses to figure out where the documentation should be displayed. main character of the directory tbh π
the .source file looks exactly like this:
<?xml version="1.0"?>
<monodoc>
<node label="LABEL" name="PATH" parent="PARENT">
<node label="LABEL2" name="PATH2" />
<!-- ... -->
</node>
<source provider="PROVIDER" basefile="BASEFILE" path="PATH" />
<!-- other <source/> elements -->
</monodoc>
the /monodoc/node node is optional, and it says where in the monodoc tree the documentation should show up. //node elements can be nested to literally any depth to build trees π³ and //node/@label is the label that gets displayed inside the monodoc tree.
//node/@name is the name of the monodoc tree node, and you can totally use it as the value of /monodoc/source/@path.
//node/@parent is the node name to use as the parent node. $MONO_INSTALL_PREFIX/lib/monodoc/monodoc.xml has a whole list of such names, and this can be any //node/@name value. and bestie, if the //node/@parent value isn't found? it just gets inserted under the "Various" tree node. no drama π«Ά
the /monodoc/source/@provider attribute says which format provider should be used when reading the .tree and .zip files β and this must correspond to one of the --format values. no freelancing allowed.
the /monodoc/source/@basefile attribute is the filename prefix for the documentation files. it must be the same prefix you used with the --out parameter. and ngl, there should be no filename extension on this value. none. zero. zip. π
the /monodoc/source/@path attribute is the parent node in monodoc(1)'s tree view where the documentation gets inserted. go peep the $MONO_INSTALL_PREFIX/lib/monodoc/monodoc.xml file for a list of PATH values (those are the //node/@name values), or it can be a //node/@name value from the same .source file. iykyk π
once the BASEFILE.source has been written, the docs can be installed so monodoc(1) will display them, with this command:
cp BASEFILE.source BASEFILE.tree BASEFILE.zip \
`pkg-config monodoc --variable=sourcesdir`
and that's it, you're slaying π
π OPTIONS π
-f,--format=FORMATβ says which documentation format is used withinPATHS. the validFORMATvalues include:ecma,ecmaspec,error,hb,man,simple, andxhtml. π
peek the FORMATS section below for the tea on these formats.
the default format (if none is specified) is ecma. periodt.
the --format option can be interleaved with PATHS to change the format used for the remaining parameters (until the next --format option shows up), like:
mdoc assemble -o PREFIX A B --format=man C D --format=xhtml E
which will assemble directories A and B with the ecma format, files C and D with the man formt, and directory E with the xhtml format. format switching mid-run, she contains multitudes π
-o,--out=PREFIXβ specify the output file prefix.mdoc assemblecreates the filesPREFIX.zipandPREFIX.tree. β¨-h,-?,--helpβ display a help message and exit. the classic "help me help you" π
π FORMATS π
the following documentation formats are supported:
π ecma
The Mono ECMA Documentation Format β an XML documentation format with one file per type.
see the mdoc(5) man page for more info.
π§ ecmaspec
The Mono ECMA Specification Documentation Format. bestie, this is not the format you're looking for β it's the format used to represent the ECMA-334 (C#) standard within monodoc(1). it is not used to display class library documentation. for class library documentation, use the ecma format. ok that's the whole disclaimer π
π error
The Error Documentation Format is used to present detailed error messages, and it lives in monodoc(1)'s "C# Compiler Error Reference" tree.
in this format, PATHS is a configuration file, containing this XML:
<ErrorProviderConfig>
<FilesPath>../../mcs/errors</FilesPath>
<Match>cs????*.cs</Match>
<ErrorNumSubstringStart>2</ErrorNumSubstringStart>
<ErrorNumSubstringLength>4</ErrorNumSubstringLength>
<FriendlyFormatString>CS{0:0###}</FriendlyFormatString>
</ErrorProviderConfig>
and the elements mean:
/ErrorProviderConfig/FilesPathβ specifies where to look for files./ErrorProviderConfig/Matchβ specifies the filename pattern to look for within the/ErrorProviderConfig/FilesPathdirectory./ErrorProviderConfig/ErrorNumSubstringStartβ specifies where within the filename the error number starts./ErrorProviderConfig/ErrorNumSubstringLengthβ specifies how many characters after/ErrorProviderConfig/ErrorNumSubstringStartto use for the error number./ErrorProviderConfig/FriendlyFormatStringβ specifies the formatting/display of the node in themonodoc(1)tree.
for each file found, it gets converted to HTML with C# syntax coloring applied. fancy π
π simple
The Simple Documentation Format file format recursively adds all files and directories underneath PATHS. when displayed, HTML files are displayed as-is. text files get converted into HTML by translating each newline into an HTML <br> element. and no other file type is supported β that's the whole list, no cap.
πΈ man
The Man Page Documentation Format displays groff man pages. (heads up: this is not a full groff parser, and it only handles the man page constructs used within the mono man pages.)
PATHS is a set of XML files containing:
<?xml version="1.0"?>
<manpages>
<manpage name="NAME" page="FILE" />
</manpages>
there may be multiple //manpage elements within the root /manpage element.
the /manpages/manpage/@name attribute contains the display name for the tree view node, which is also the URL of the man page when using monodoc(1)'s Lookup URL command (before prefixing with a man: prefix). so if /manpages/manpage/@name contains mono(1), then man:mono(1) can be used in the Lookup URL command to view the mono(1) man page. cute right?? π«Ά
the /manpages/manpage/@page attribute is the filename that contains the man page. and if this file does not exist, then /manpages/manpage/@name will not be displayed within the tree view. gone, ghosted, not showing up π
β xhtml
The XHTML provider interprets PATHS as a Windows Help file XHTML TOC file and looks for referenced documents to create the help source. go get 'em β¨
π₯ SEE ALSO π₯
π MAILING LISTS π
visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details. come hang out π«Ά
π WEB SITE π
see also: http://www.mono-project.com/docs/tools+libraries/tools/mdoc/
and that's the page bestie!! every flag, every attribute, every weird XML node, all of it. slay π
mwah, xoxo β this was mdoc-assemble(1), the General Commands Manual page, signed off as mdoc-assemble(1) π
πβ¨
π¦ where this page comes from
- alpine 3.24: mono-doc 6.14.1-r1 Β· MIT
- arch rolling: mono 6.12.0.206-1 Β· GPL AND LGPL2.1 AND MPL
- debian bookworm: monodoc-base 6.8.0.105+dfsg-3.3+deb12u1 Β· MIT
- debian trixie: monodoc-base 6.12.0.199+dfsg-6 Β· MIT
- epel 10: monodoc 6.14.1-1.el10_2 Β· MIT
- epel 9: monodoc 6.12.0-5.el9 Β· MIT
- fedora 43: monodoc 6.12.0-21.fc43 Β· MIT
- fedora 44: monodoc 6.14.1-3.fc44 Β· MIT
- fedora 44: monodoc 6.14.1-4.fc44 Β· MIT
- nixos 26.05: mono 6.14.1
- nixpkgs unstable: mono 6.14.1
- opensuse-leap 16.0: monodoc-core 6.12.0-bp160.1.1 Β· LGPL-2.1-only
- opensuse-leap 16.0: monodoc-core 6.12.0-bp160.1.1 Β· LGPL-2.1-only
- opensuse-leap 16.0: monodoc-core 6.12.0-bp160.1.1 Β· LGPL-2.1-only
- opensuse-leap 16.0: monodoc-core 6.12.0-bp160.1.1 Β· LGPL-2.1-only
- ubuntu jammy: monodoc-base 6.8.0.105+dfsg-3.2 Β· MIT
- ubuntu noble: monodoc-base 6.8.0.105+dfsg-3.6ubuntu2 Β· MIT
- ubuntu questing: monodoc-base 6.12.0.199+dfsg-6
- ubuntu resolute: mono-devel 6.14.1+ds2-2 Β· MIT
- ubuntu stonking: mono-devel 6.14.1+ds2-3 Β· MIT
- (C) 2008 Novell, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms