From 5788de8408b0433443be81377f92498957d96908 Mon Sep 17 00:00:00 2001 From: Luca Bonavita Date: Thu, 15 Mar 2012 00:12:31 +0000 Subject: == Python API docs == New command line options: -l: logs bpy dumping problems in OUTPUT_DIR/.bpy.log -L: logs sphinx|latex problems in: * OUTPUT_DIR/.sphinx-build.log (sphinx building html problems) * OUTPUT_DIR/.sphinx-build_pdf.log (sphinx building latex problems) * OUTPUT_DIR/.latex_make.log (latex make problems) -P: builds the pdf -R: pack the files in a dir ready for online deployment (including the zip and the pdf eventually) Example usage: ./cmake/bin/blender -b -P ./blender/doc/python_api/sphinx_doc_gen.py -- -p bmesh* -l -o ./python_api -B -P -R -L --- doc/python_api/sphinx_doc_gen.py | 336 ++++++++++++++++++++++++++++++--------- 1 file changed, 257 insertions(+), 79 deletions(-) (limited to 'doc') diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index b15fcd9303b..52024b04c93 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -35,7 +35,7 @@ API dump in RST files ./blender.bin -b -P 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 -b -P 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,45 @@ def handle_args(): usage=SCRIPT_HELP_MSG ) - # optional arguments - parser.add_argument("-o", "--output", - dest="output_dir", + # optional arguments + parser.add_argument("-p", "--partial", + dest="partial", type=str, - default=SCRIPT_DIR, - # XXX, THIS ISNT WORKING, EXAMPLE SCRIPTS WILL NOT BE FOUND - help="Path of the API docs (default=