- Shell 100%
| templates | ||
| vendor | ||
| .gitignore | ||
| .gitmodules | ||
| auto_update.sh | ||
| build.sh | ||
| BUILD_CONFIG | ||
| example.rtfl | ||
| install.sh | ||
| LICENSE | ||
| main.rtfl | ||
| project.json | ||
| README.md | ||
| run.sh | ||
rtfldoc
Documentation generator that creates webpages from RtflDoc comments in Rtfl source code. Similar to JavaDoc in the Java world.
Usage
rtfldoc <Rtfl file to document>
The generated HTML file will be available in a directory named doc located in the current working directory.
The name of the file will be the input Rtfl file's filename with .rtfl replaced with .html.
Building
Before building, clone the repository with the --recursive Git option.
This is necessary to pull down the rtfltemp program, which the build process depends on.
Before building, check BUILD_CONFIG and modify it as needed.
Run ./build.sh to build the program. If you just want to run it, use run.sh, which will build and then run with any arguments provided.
To install as an executable called rtfldoc, run install.sh (may need to use sudo).
Documentation Comments
Documentation comments (hereby referred to as "doc comments") start with //@, followed by the attribute name and its value.
Singular attributes that apply to the entire module have their first letter capitalized.
Attributes can be applied to the module, global variables (def variables) and functions.
Attributes on global variables and functions must be placed before the declaration of the variable or function.
All text values in doc comments are allowed to contain HTML.
Module Attributes
-
//@NameThe module's formal name.
-
//@DescA description of the module.
-
//@VersionThe module's version.
-
//@TitleThe page title of the generated documentation file.
-
//@dependsAnother module that the module depends on. Multiple
dependsattributes are allowed. -
//@guideA line of text or HTML in the module's usage guide. Multiple
guideattributes are allowed.
Global Variable Attributes
-
//@varDescribes the global variable.
Function Attributes
-
//@descA description of the function.
-
//@sinceSpecifies the first version of the module in which the function appeared
-
//@returnDescribes the return value of the function
-
//@param <name>Describes the argument with the specified name. Multiple
paramattributes are allowed.
Example
See the example.rtfl for a demonstration of all doc comment attributes.