I propose here a new convention and design for a tool to auto-generate API documentation for source code in any language, with no dependencies or intricate build commands. Here are my assumptions:
- Source code in plain text format
- Language supports comments, either single- or multi-line (multi-line would be easier to use for documentation)
- A convention to interpret comments starting with a certain character as documentation comments, e.g. for OCaml we would use
(**
to mark the start of documentation comments.
Given the above, we can create a tool that has the following UI:
doctool [--output-dir DIR] --start STARTSTR --end ENDSTR --lang LANGUAGE FILE...