diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index b15fcd9303b..327707facc7 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -26,16 +26,16 @@ API dump in RST files --------------------- Run this script from blenders root path once you have compiled blender - ./blender.bin -b -noaudio -P doc/python_api/sphinx_doc_gen.py + ./blender.bin --background -noaudio --python doc/python_api/sphinx_doc_gen.py This will generate python files in doc/python_api/sphinx-in/ providing ./blender.bin is or links to the blender executable To choose sphinx-in directory: - ./blender.bin -b -P doc/python_api/sphinx_doc_gen.py -- -o ../python_api + ./blender.bin --background --python doc/python_api/sphinx_doc_gen.py -- -o ../python_api For quick builds: - ./blender.bin -b -P doc/python_api/sphinx_doc_gen.py -- -q + ./blender.bin --background --python doc/python_api/sphinx_doc_gen.py -- -p Sphinx: HTML generation @@ -75,6 +75,7 @@ import os import sys import inspect import shutil +import logging from platform import platform PLATFORM = platform().split('-')[0].lower() # 'linux', 'darwin', 'windows' @@ -94,27 +95,36 @@ def handle_args(): usage=SCRIPT_HELP_MSG ) - # optional arguments + # optional arguments + parser.add_argument("-p", "--partial", + dest="partial", + type=str, + default="", + help="Use a wildcard to only build specific module(s)\n" + "Example: --partial bmesh*\n", + required=False) + + parser.add_argument("-f", "--fullrebuild", + dest="full_rebuild", + default=False, + action='store_true', + help="Rewrite all rst files in sphinx-in/ " + "(default=False)", + required=False) + + parser.add_argument("-b", "--bpy", + dest="bpy", + default=False, + action='store_true', + help="Write the rst file of the bpy module " + "(default=False)", + required=False) + parser.add_argument("-o", "--output", dest="output_dir", type=str, default=SCRIPT_DIR, - # XXX, THIS ISNT WORKING, EXAMPLE SCRIPTS WILL NOT BE FOUND - help="Path of the API docs (default=