For my uPIDE micropython IDE I would like to do some micropython specific conext help. I would like to use the .rst files as a basis. Like e.g. this file for the machine module:
https://github.com/micropython/micropyt ... achine.rst
But I am unable to find anything that can read this into a real pythonic data structure. Docutils should be able to do this. But these are sphinx files which are an extension to rst which docutils can't read. Sphinx itself can be used to convert this and there's even a Makefile at https://github.com/micropython/micropyt ... s/Makefile that does this kind of conversion. But even if I use that to convert the rst to let's say JSON then most of the contents ends up HTML'ised to strings inside JSON.
Is there a (pythonic) way of reading those rst files into data structures that allow me to easily extract a description for e.g. a certain module, class or function? I am hesitant to write a parser from scratch ...
Machine readable documentation
- aivarannamaa
- Posts: 171
- Joined: Fri Sep 22, 2017 3:19 pm
- Location: Estonia
- Contact:
Re: Machine readable documentation
IMO the best is https://github.com/hlovatt/PyBoardTypeshed
Aivar Annamaa
https://thonny.org
https://thonny.org