Sphinx!
sforman@bock:~/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs$ make html Running Sphinx v1.7.3 loading pickled environment... not yet created building [mo]: targets for 0 po files that are out of date building [html]: targets for 25 source files that are out of date updating environment: 25 added, 0 changed, 0 removed reading sources... [100%] types /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Derivatives_of_Regular_Expressions.rst:540: WARNING: image file not readable: notebooks/attachment:omg.svg /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Developing.rst:611: WARNING: Title level inconsistent: Here they are... ~~~~~~~~~~~~~~~~ /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Developing.rst:624: WARNING: Title level inconsistent: ...and they do sum to 999. ~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Developing.rst:710: WARNING: Title level inconsistent: Generalizing to Blocks of Terms ------------------------------- /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Ordered_Binary_Trees.rst:701: WARNING: Content block expected for the "parsed-literal" directive; none found. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string. /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Types.rst:1519: WARNING: Unknown target name: "divmod". /home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Types.rst:1947: WARNING: Unknown target name: "divmod". WARNING: autodoc: failed to import module u'joy.utils.polytypes'; the following exception was raised: No module named polytypes looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] types generating indices... genindex py-modindex highlighting module code... [100%] joy.utils.types writing additional pages... search copying static files... WARNING: html_static_path entry u'/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/_static' does not exist done copying extra files... done dumping search index in English (code: en) ... done dumping object inventory... done build succeeded, 23 warnings. The HTML pages are in _build/html.
I think it would be good to nail down the problems when going from a Notebook to a Sphinx webpage. Some of the math symbols don't make it through ( a Yen symbol is one clue!)
I don't think I'm doing anything weird.
(*.ipynb) -> [nbconvert] -> (*.rst) -> [sphinx] -> (*.html)
The nbconvert tool can output HTML too but the Sphinx HTML is much much prettier.
https://osdn.net/projects/joypy/scm/hg/Joypy/commits/372fea017e1f51d082ce3108c587a4e6d260139e Make all the docs.
https://osdn.net/projects/joypy/scm/hg/Joypy/commits/b9ffe6340ee16d3c35e260a48edfaccc8245d1b0 Don't automodule non-existent joy.utils.polytypes module.
In re: omg.svg, the notebook stores it as an attachment:
... { "attachments": { "omg.svg": { "image/svg+xml": [ "PD94bWwgdmVyc2lvbj0iMS4wIiB... ] } }, "cell_type": "markdown", "metadata": {}, "source": [ "## State Machine\n", "We can drive the regular expres... "\n", " .111. & (.01 + 11*)'\n", "\n", "Says, \"Three or more 1's and not... "\n", "![omg.svg](attachment:omg.svg)\n", "\n", "\n", "Start at `a` and follow the transitio... ] }, ...
When nbconvert converts it to ReST it looks like this:
... Says, "Three or more 1's and not ending in 01 nor composed of all 1's." .. figure:: attachment:omg.svg :alt: omg.svg omg.svg Start at ``a`` and follow the transition arrows according to their ...
Leading sphinx to warn:
Thun/docs/sphinx_docs/notebooks/Derivatives_of_Regular_Expressions.rst:540: WARNING: image file not readable: notebooks/attachment:omg.svg
IIRC I was manually deleting the attachment: prefix in the ReST file and copying omg.svg to the Thun/docs/sphinx_docs/notebooks directory.
Joypy/docs/sphinx_docs % gmake html Running Sphinx v4.3.0 WARNING: html_static_path entry '_static' does not exist building [mo]: targets for 0 po files that are out of date building [html]: targets for 25 source files that are out of date updating environment: [new config] 25 added, 0 changed, 0 removed reading sources... [100%] types /usr/home/sforman/src/Joypy/docs/sphinx_docs/notebooks/Derivatives_of_Regular_Expressions.rst:539: WARNING: image file not readable: notebooks/attachment:omg.svg /usr/home/sforman/src/Joypy/docs/sphinx_docs/notebooks/Developing.rst:611: WARNING: Title level inconsistent: Here they are... ~~~~~~~~~~~~~~~~ /usr/home/sforman/src/Joypy/docs/sphinx_docs/notebooks/Developing.rst:624: WARNING: Title level inconsistent: ...and they do sum to 999. ~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/home/sforman/src/Joypy/docs/sphinx_docs/notebooks/Developing.rst:710: WARNING: Title level inconsistent: Generalizing to Blocks of Terms ------------------------------- ...
So we have a few things here already:
* WARNING: html_static_path entry '_static' does not exist
* WARNING: image file not readable: notebooks/attachment:omg.svg (as above)
* WARNING: Title level inconsistent: x 3
.../Joypy/docs/sphinx_docs % mkdir _static
It's empty so git ignores it?
Set up Sphinx and see if I can rebuild the sphinx docs.