From e4253fa2b8aa08b9d185a8cf460a8d68fac7bcb6 Mon Sep 17 00:00:00 2001 From: Luca Bonavita Date: Thu, 8 Mar 2012 18:36:23 +0000 Subject: == Python API docs == - Enhanced the -T option: - we can now choose among custom themes (now 'blender-org' and later 'naiad') and Sphinx internal themes (use -h option to see which ones) - choosing a custom theme will copy the theme dir to the output dir - Added two new command line options: -N: Add the theme name to the html dir name For example, if we choose the theme 'haiku' with using -N will create html files in sphinx-out_haiku/ Useful to test separate themes without overwriting the smae folder each time -B: Builds the html docs running sphinx-build This is useful to avoid runing sphinx with a separate shell command - Fixed the URL in undocumented_message() --- doc/python_api/sphinx_doc_gen.py | 121 +++++++++++++++++++++++++++------------ 1 file changed, 85 insertions(+), 36 deletions(-) diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index a4fa27fd90d..d8407121ae1 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -77,7 +77,7 @@ import shutil from platform import platform PLATFORM = platform().split('-')[0].lower() # 'linux', 'darwin', 'windows' -SCRIPT_DIR = os.path.dirname(__file__) +SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) def handle_args(): @@ -88,7 +88,7 @@ def handle_args(): # When --help is given, print the usage text parser = argparse.ArgumentParser( - formatter_class=argparse.RawDescriptionHelpFormatter, + formatter_class=argparse.RawTextHelpFormatter, usage=SCRIPT_HELP_MSG ) @@ -100,11 +100,36 @@ def handle_args(): help="Path of the API docs (default=