lisp-project-of-the-day icon indicating copy to clipboard operation
lisp-project-of-the-day copied to clipboard

sphinxcontrib-cldomain

Open utterances-bot opened this issue 5 years ago • 6 comments

sphinxcontrib-cldomain

https://40ants.com/lisp-project-of-the-day/2020/11/0210-sphinxcontrib-cldomain.html

utterances-bot avatar Nov 19 '20 13:11 utterances-bot

Is it possible to use this without the CL part? I.e. either write the JSON file manually, or include the signature of functions etc.. in the .rst? I want to document some embedded lisp-stuff, no chance running the CL part on the microcontroller.

rmu75 avatar Nov 19 '20 13:11 rmu75

Aren't you able to load your code into the CL on the usual computer?

svetlyak40wt avatar Nov 19 '20 14:11 svetlyak40wt

@rmu75 anyway, I'm sure, cldomain can be hacked to use another json file generator or to use another source of knowledge about docstrings. But this will require some work.

svetlyak40wt avatar Nov 19 '20 14:11 svetlyak40wt

I can't really load anything into a "real" lisp, because I want to document native stuff that is exported from C++ into the lisp interpreter, so there is no real lisp code and because of code-size constraints also no docstrings.

Is the JSON file format documented somehow or do you have some pointers? At least an example would be very helpful, reversing it from the python code seems to be error prone.

rmu75 avatar Nov 19 '20 14:11 rmu75

No, JSON format is not documented. No need to reverse python code. You can reverse (or adopt CL code):

https://github.com/40ants/cldomain/blob/master/src/sphinxcontrib.cldomain.lisp#L391

Or probably it will be easier to run https://github.com/40ants/cldomain/blob/master/roswell/cldomain.ros script to generate JSON for the Lisp system from my example project. It will output JSON and you'll be able to inspect it's structure.

svetlyak40wt avatar Nov 19 '20 15:11 svetlyak40wt

yes, in hindsight, that should have been obvious to me. thanks.

rmu75 avatar Nov 19 '20 18:11 rmu75