- Any comment that starts with
---
or///
is a doc-string (i.e. 3 comment-characters in a row) - Doc-strings continue on until a non-docstring line
- Doc-strings for modules contain
=== my.modulename ===
, then any number of lines describing it - Doc-strings for items (functions, variables, etc.) go like this:
- The first line starts with
my.modulename.item
ormy.modulename:item
-- this is the item name - Any non-alphanumeric character ends the item name and is ignored, i.e. parentheses or spaces:
my.modulename:foo()
my.modulename:foo(bar) -> string
my.modulename.foo(bar, fn(int) -> int)
my.modulename.foo = {}
- The second line is a single captitalized word, like "Variable" or "Function" or "Method" or "Constant" or "Field"
- The remaining lines describe the item
- The first line starts with
- Any comment that starts with 4 comment-characters is ignored
- Only files ending in
.lua
or.m
are scanned
$ pip install --user -r requirements.txt
$ make docs
Your output will now be in build/ in the following forms:
- Hammerspoon.docset - Docs bundle for the excellent "Dash" browser
- html - HTML docs