website icon indicating copy to clipboard operation
website copied to clipboard

Investigate auto generating parts of docs

Open devlead opened this issue 5 years ago • 5 comments

Currently the CLI usage is out of sync with the latest release i.e. experimental is there, bootstrap isn't and so on.

Got me thinking this should be able to be codegened, putting this in an issue for future discussion.

Did a quick PoC just parsing the help command output

Usage: Cake.exe [script] [--verbosity=value]
                [--showdescription] [--dryrun] [..]

Example: Cake.exe
Example: Cake.exe build.cake --verbosity=quiet
Example: Cake.exe build.cake --showdescription

Options:
    --verbosity=value    Specifies the amount of information to be displayed.
                         (Quiet, Minimal, Normal, Verbose, Diagnostic)
    --debug              Performs a debug.
    --showdescription    Shows description about tasks.
    --dryrun             Performs a dry run.
    --exclusive          Execute a single task without any dependencies.
    --bootstrap          Download/install modules defined by #module directives
    --version            Displays version information.
    --help               Displays usage information.

result is image

Code for that is avail here, it's just a rough 5 minute PoC.

Ideally we should have better meta data i.e. if cake could report as xml, json etc. but wanted to test something end to end, basic idea is

  • Have a main manually created document
  • Where parts of the document is automatically generated

In the poc this is achieved using the WYAM include module and ^ preprocessor example:

`^"../../../generatedinput/cake-usage.md"

devlead avatar Oct 10 '18 12:10 devlead