torch / argcheck

A powerful (and blazing fast) argument checker and function overloading system for Lua or LuaJIT
Other
54 stars 17 forks source link

Preparing the argcheck.doc for large projects #11

Open gforge opened 8 years ago

gforge commented 8 years ago

As projects grow bigger the API-documentation can be difficult to manage. I would like to see (1) support for multiple files and (2) automated generation of table of contents (TOC).

Allowing direct markdown output to multiple files.

In our Dataframe package we use th doc.lua > Doc/README.md in order to create the docs. As the Dataframe has grown in functionality we have split the package into main functions and extensions. The latter are in a subdirectory and therefore easy to navigate and find. Unfortunately argcheck.doc relies on detecting the output being a tty and we aren’t sure how to separate each extension file in the th doc.lua call. The only solution it seems is to add a bash-script outside Lua that does this. Could you consider amending the usage.render/doc.stop?

Adding a table of contents

I saw in your Cairo-ffi that all function definitions are accommodated with a an anchor, i.e. <a name="ImageSurface.new">. We have copied that structure, unfortunately I can’t find any way to autogenerate a table of contents using that information. Atom has a neat package that allows this, perhaps it could work as a template for the Lua implementation?

Thanks for an awesome package!