Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Sphinx Intro====== * Sphinx is an auto documentation generation python module tool for your source codes. * download: http://sphinx-doc.org/ * tutorial * http://www.youtube.com/watch?v=LQ6pFgQXQ0Q * after download the source, build it for your python version in its directory<code bash>python setup.py build</code> * after its done, copy build/lib/sphinx directory to your prefered python module directory ====== Sphinx Usage====== * after sphinx in your python sys.path, and you are call it to check its installation success <code python>import sphinx</code> * since you will use sphinx on all system, then I assume you run all the command in python shell, unless you want to follow Sphinx offical tutorial using system command shell to call function; Here, I will show all the calls in python shell. - create doc project folder and change current working directory to it - build rst configuration directory struction for generation docs <code python> # run quickstart method to make auto doc project directory structure, # same as sphinx-quickstart shell command in that current working directory from sphinx import quickstart quickstart.main() # then shows: Welcome to the Sphinx 1.2.2 quickstart utility. ... and questions </code> - edit conf.py and index.rst and create additional rst files for auto generation guide - generate the docs into _build sub-folder, same as sphinx-build shell commands * shell version <code bash>python /path_to_Sphinx/sphinx-build.py -b html . ./_build</code> * python version <code python># since the sys.argv is ['/path_to_Sphinx/sphinx-build.py', '-b', 'html', '.', './_build'] import sphinx sphinx.main(['','-b','html','.','./_build']) # 1st arg is empty # you get same: Running Sphinx v1.2.2 .... and docs in _build folder </code> ====== Sphinx for mel language ====== * tips on use Sphinx for my mel project tools documentation. * to do appwiki/sphinx.txt Last modified: 2021/08/28 08:27by ying