Default Commands❖
sphinx_doclang.commands
Overview❖
DocLang includes a very small set of built‑in commands that form the core of the language. These commands are intentionally minimal: they provide only the essential building blocks required for formatting titles, creating sections, generating delimiters and inspecting internal DocLang state during development.
The default commands are not meant to cover every documentation pattern. Most projects define their own commands because documentation needs differ widely between users, domains and codebases. DocLang treats commands as project‑level features, not global standards, which means that custom commands can freely override or replace the defaults without restriction.
This page documents the commands that DocLang provides out of the box. They are intended primarily as examples of how commands behave, how arguments are parsed and how output is generated. Debug and introspection commands are also included to help developers understand the current object context and verify template values during command development.
For real‑world documentation, users are expected to extend DocLang with their own commands tailored to their project’s structure, style and requirements.
Reference❖
- cmd_delimiter(*args, decorator: str = '~', **kwargs) str❖
Generates a small decorative delimiter line.
The
decoratorcharacter is just a preference repeated four times to form the output.- Usage:
§ delimiter ¶§ delimiter : decorator = * ¶
- cmd_title(name: str, *args, style: str = 'Az', decorator: str = '=', **kwargs) str❖
Generates a formatted title with an underline.
- The
styleoption controls how the title text is transformed: AZorupper➜ UPPERCASEazorlower➜ lowercaseAzorcapitalize➜ CapitalizedAz Azorcamel➜ Camel Case (capitalize each word)
The underline is created by repeating the
decoratorcharacter to match the length of the final title.- Usage:
§ title : My Title ¶§ title : my title, style = upper, decorator = - ¶
- The
- cmd_section(title: str, *args, style: str = 'Az', decorator: str = '-', **kwargs) list[str]❖
- Creates a section block consisting of:
a delimiter line
an empty line
a formatted title
The
styleanddecoratoroptions are passed directly to thetitlecommand.- Usage:
§ section : My Section ¶§ section : utilities, style = upper, decorator = ~ ¶
- cmd_debug_object(*args, **kwargs) list[str]❖
Displays debugging information for the current DocLang object.
- Usage:
§ debug object ¶
- cmd_self_name(*args, **kwargs) str❖
Returns the name of the current object.
By default, the short name (without module path) is returned.
If any argument is provided, the full dotted name is returned instead. The actual value or number of arguments does not matter. Providing an argument simply acts as a flag to request the full name.
- Usage:
§ self name ¶§ self name : _ ¶
- cmd_self_type(*args, **kwargs) str❖
Returns the type of the current object.
- The value corresponds to the internal
typefield stored in the DocLang template context, for example: classfunctionmethodmodule
- Usage:
§ self type ¶
- The value corresponds to the internal