-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finish support restructured text (rST) and sphinx in leoRst.ts #80
Comments
I did a quick search for rST & JavaScript and found the following GH references: PS: I have seen the 'help wanted' tag - but - don't feel that I would be able to help with an implementation in JS/TS. |
This comment was marked as outdated.
This comment was marked as outdated.
I'll also explore what Thomas said on the google group:
|
LeoJS doesn't need docutils in Typescript. LeoJS probably does need something like sphinx-js. docutils Unless I am seriously mistaken, LeoJS does not need docutils. Indeed,
The make-sphinx button LeoDocs.leo uses the
On Windows, make.bat and Makefile reside in the leo/doc/html folder. Summary LeoJS probably needs sphinx-js. sphinx-js looks good at first glance. YMMV. You may also want to transliterate the |
With Leo, Sphinx is called as a command-line program by a user script or command, not by Leo code. So LeoJS could do the same thing. Sphinx would have to be installed (along with Python) outside of VSC, and the LeoJS user would write a command to run it as a command line program. It should not be necessary to find a Javascript port of Sphinx. |
@edreamleo about sphinx-js : sadly, its not a javascript implementation of sphinx, it's just a tool for pulling JSDoc-formatted documentation comments from javascript/typescript source files, and turn that into reStructuredText pages. |
Some follow-up about this single missing features of LeoJS: rst support @edreamleo @tbpassin I don't intend to cover leoDocs and its specific generation-scripts in LeoJS. I just intended to have leoRst.py converted, and functional. (I'll do a complete refactor/rewrite of the current Leo documentation in a modern web framework very soon 😄 ) @ranvik14 Sadly, docutils-js, restructured (and docutils-typescript) are unfinished projects which would need almost more work to use than translating docutils from python to typescript. (I tried compiling and using them. It's working, but with many bugs and many components and directives of rst markup are unsupported or missing) What would be needed is some 'light' version of docutils for js or ts... Something that just converts from string to string, leaving the file i/o to the upstream caller. like the original author of docutils-js, @kaymccormick, intended, etc... Don't know how much rst support is worth for leonistas in general. I hope to someday have the time to make this part of LeoJS working! |
@boltex I agree with your choice not to assign a milestone to this issue. |
I don't think it needs to be difficult if you are willing to call an external program. The way I create RsT documentation with LeoPY is with the
The Yes, to use Sphinx one has to install Python. To run Asciidoc one might install Ruby to run the Ruby Asciidoc processor. I think that's all right. VR3 can use the Ruby Asciidoc processor, and of course it has to be installed. If users want the capability, let them install Sphinx, which does entail installing Python. |
There's also an RDoc Ruby command line documentation generator. I don't know what its source tree has to look like, and it uses Markdown, but one could write a command similar to But since we already have the |
Thanks to all who have posted to this thread. About LeoDocs.leo: LeoDocs is not part of LeoJS. Also, like Thomas said, in LeoDocs.leo, Sphinx is called as a command-line program by a user script or command. This could be done in LeoJS without any problems by a user wanting to use sphinx. There are examples of using OS commands in the LeoJS sample scripts repository. See https://github.com/boltex/scripting-samples-leojs Maybe Sphinx-JS should be included in LeoJS as a library available to Leo Scripts. I'll try to include it in the next release as many Leonistas seem to be fond of that tool 😄 About docutils-js: This was intended to be a port of python's docutils to javascript,but sadly it's author Kay McCormick About rst-compiler: This seems to be an equivalent of docutils ! It's brand new from this month! I'll take a look at it in more details right now! Thanks @ranvik14 !!! Greatly appreciate your continuous research! I'll keep posting details about what I find. (this is a bit harder for me because although I've been using Leo since 2002, I've never done anything with rst nor sphinx ever, so I'm a total noob when it comes to those things.) |
Most of leoRst.ts is implemented, but the following lines importing the 3rd party libraries to handle restructured text (rST) in leoRst.py can not easily be reproduces in leoRst.ts, preventing the whole of the rst functionality to run:
Find some libraries to do the equivalent, or implement this functionality from scratch (or via transliterating the python sources) to enable the rst functionality in LeoJS.
The text was updated successfully, but these errors were encountered: