#1867 <https://github.com/leo-editor/leo-editor/issues/1867> suggests removing all but the most basic features of the rst3 command. Leo's own documentation, in LeoDocs.leo, use all and only those basic features.
*Overview* This project has been a great success: - The rst3 command should work exactly as before for those who use only the basic features. - Regenerating all of Leo's web site with the new rst3 command appears to work. - The rst3 sources, in leoRst.py, are now completely straightforward. All evil kwargs are gone, and the calls chains are much simpler, and much other cruft is gone. - The simplified code in leoRst.py allow a new, simple, general way for Leonistas with scripting skills to create bespoke content from existing nodes anywhere in an outline. See below. *Aha: Writers alone are responsible for content* The supposed limitations of Leo's rst3 command have been the subject of discussion for about two decades. For example, there have been many requests for "half clones", clones that don't contain their descendants. The advance rst3 features were a feeble, way-too-complex, attempt at a workaround. All those features are misguided because* writers alone are responsible for content of @rst trees*. rst3 merely supports organizing the content with outlines. Writers are free to use clones within @rst trees, if that works. If not, writers must create bespoke content, possibly by cutting and pasting text. This principle cuts the Gordian Knot. But do not despair. The simplified code in leoRst.py allow a new, simple, general way for Leonistas with scripting skills to create bespoke content from existing nodes anywhere in an outline, as I'll now explain. *Custom content filters* The rst3 command creates *sources* from @rst trees. These sources can optionally be written to *intermediate files*, or passed to docutils and written to so-called *docutils files*. The old version used complex options to attempt to modify the sources. All those options are gone. Now, rst.writeNode creates all the sources in a straightforward way. writeNode creates sources from headlines (p.h) as follows: self.result_list.append(self.underline(h, p)) and creates sources from body text (p.b) this way: self.result_list.append(p.b) *Python's text tools are evolving* Tools such as sphinx and docutils continue to become more capable. For example, sphinx now using pygments for all syntax coloring. There is no need to support silver city, or provide any settings for code blocks. Furthermore, sphinx content can now be simpler than before. I am simplifying the @rst trees in LeoDocs.leo as a result. -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/9c8db4a6-6823-41d5-802b-f4fd65240570n%40googlegroups.com.
