At minimum, any user-facing functions should be documented.
Something that can have external docs automatically generated would be ideal - keeping the wiki for Lokasenna_GUI updated has proven to be an immense pain.
To Do
[x] Establish a documentation format - LuaDoc
[x] Parse a file for tags
[x] Generate Markdown from raw documentation
[x] Parse data from each tag type (i.e. @param has a name, type, and optional description)
[x] Generate a function signature
[x] Generate Markdown for each tag
[x] Concatenate data for one doc segment into a single Markdown chunk
[x] Concatenate chunks into a single document
[x] Add @module preamble, use as a check to ignore undocumented files
Should include the path for requireing it
[x] Write the file somewhere
[x] Document non-function stuff like T and the string metatable shenanigans
Just use the module preamble for now
[x] Generate docs for all files accessible from a given path
[x] Document class params and methods
[ ] Document example scripts
Esp. the image grid in the image demo
[x] Document remaining public modules
[ ] Document public-facing aspects of gui
Later
[ ] Handle : functions, add self to the sig?
[ ] Find a way to indicate private arguments such as Table.stringify's currentDepth
[ ] Something like @const for constant tables such as public/const.lua or the color presets
LDoc just requires a table to be marked with a --- comment and autogenerates the rest
[ ] Handle default props so their names and default values can be parsed
[ ] Allow docs to be generated from the command line
The doc parser uses Reaper's file commands, so this would require a significant amount of rework to be useable via Bash.
[ ] Tests for doc parsing logic
[ ] Document test functions so they can be auto-generated
[ ] Put hand-written documentation in a separate folder and copy it to /docs when Doc Parser is run.
At minimum, any user-facing functions should be documented.
Something that can have external docs automatically generated would be ideal - keeping the wiki for Lokasenna_GUI updated has proven to be an immense pain.
To Do
@param
has a name, type, and optional description)@module
preamble, use as a check to ignore undocumented filesrequire
ing itT
and the string metatable shenaniganspublic
modulesgui
Later
self
to the sig?Table.stringify
'scurrentDepth
@const
for constant tables such aspublic/const.lua
or the color presets---
comment and autogenerates the rest/docs
when Doc Parser is run.