The bases of this code came from Andrea, like to thank him again for this as without it I would not have been able to do this.
I have checked it in. Some explanations to it all. you need: - easy-install Sphinx (using version 1.0.7) - Graphviz is needed for the Inheritance diagrams (http://graphviz.org/) - easy-install rst2pdf (the build of the Dabo doc doesn't yet work with this, working on it, but it is already configured in conf.py. My own Sphinx based documentation is building, but it is way less complex. There might be other stuff which I already had installed, e.g. PIL. Directory structure: dabodoc - api -- sphinx --- _rst_basefiles ---- index_normal.rst - the introduction page ---- tree_module_list.rst - configuration of the content used in the "Tree" widget on the right of a content page ---- index_*, not currently used -- build - currently empty, will contain the generated documentation in the following sub-directories --- html - for html doc --- pdf - for pdf doc -- source, Sphinx/rst source files (will be created by the makeRST.py script) --- _static - images and css --- _templates - html templates --- dabo_theme - the Sphinx theme files used --- conf.py - the Sphinx configuration file -- tempsource - Sphinx/rst source files (will be created by the makeRST.py script, a full build of Sphinx is quite long about 10 minutes on my machine, this reduces the time and subsequent builds. If one wants to do a full build you can pass "True" as the first arg to makeRST.py. -- config.py - configuration values for Dabo Sphinx, at least "sphinxBuildCmd" and "graphVizDot" need to be adjusted, i.e. define where these commands are on your system -- galleryToClassIndex.py - is generated by makeRST.py and is used by genGallery to generate the links to the documentation -- genGallery.py - generates the gallery page, this is invoked during the Sphinx build -- make.bat - Windows bat file with Sphinx build commands, currently not really used except when I research Sphinx build problems -- makeRST.py - Generates the .rst files by reading the Dabo source tree, the Dabo source tree should be in a folder called "dabo" at the same level as sphinx, in other words if building in the dabodoc tree then the api folder needs to contain the 'dabo' source tree. makeRST.py True will copy all the generated .rst files to the source folder, otherwise only changed or new ones are copied from tempsource to source -- makeSphinx.py - Does the Sphinxd-build command, by default it builds the "html" version and it will be put into build/html. This run takes about 10 minutes on my machine, pretty new Intel i5 with Windows 7. It writes information to stdout and it creates also a file "sphinxstderr.txt" containing all warnings and errors (html builds without error at this point, however you might see "[INFO] __init__.py:427 Automatically loading default ui 'wx'..." in the file), it will be empty if no problems were found. running "makeSphinx.py html True" will clear the build/html folder and do a full build, "makeSphinx.py pdf True|False" will do the PDF build, but as noted above this does not yet work. I hope I mentioned all the important bits, if anyone runs this and has problems please let me know. The code could probably be much better structured, but it is what it is. Most of the stuff which was specific to Andrea's wx.lib.agw should be gone by now, but there might still be some left overs. Paul, if you put this into a daily run can you maybe forward the "sphinxstderr.txt" to me, I will then have a look at it and make any necessary corrections. Werner _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
