diff options
author | Luca Bonavita <mindrones@gmail.com> | 2010-10-13 14:42:33 +0400 |
---|---|---|
committer | Luca Bonavita <mindrones@gmail.com> | 2010-10-13 14:42:33 +0400 |
commit | 996efebbe36a06ba45b9a79328a0dadc87ea2ff9 (patch) | |
tree | dd5a64d001a8e482d538effd94f60a593e6ef56e /doc/python_api/sphinx_doc_gen.sh | |
parent | d058a9c8c3d5481fa0c82c8118d207fda6b56830 (diff) |
== python api doc ==
First commit to make some structure in doc/ directory.
- moved source/blender/python/doc -> doc/python_api
- moved source/gameengine/PyDoc/*.rst -> doc/python_api/rst
- modified accordingly sphinx_doc_gen.py and sphinx_doc_gen.sh
(later on I'll try alternative/ scripts by neXyon as promised :)
- source/gameengine/PyDoc/ is still there because contains epydoc stuff for the bge, will ask more and look into it later
Diffstat (limited to 'doc/python_api/sphinx_doc_gen.sh')
-rwxr-xr-x | doc/python_api/sphinx_doc_gen.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/python_api/sphinx_doc_gen.sh b/doc/python_api/sphinx_doc_gen.sh new file mode 100755 index 00000000000..49a2e4869d8 --- /dev/null +++ b/doc/python_api/sphinx_doc_gen.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# run from the blender source dir +# bash source/blender/python/doc/sphinx_doc_gen.sh +# ssh upload means you need an account on the server + +BLENDER="./blender.bin" +SSH_HOST="ideasman42@emo.blender.org" +SSH_UPLOAD="/data/www/vhosts/www.blender.org/documentation" # blender_python_api_VERSION, added after + +# sed string from hell, 'Blender 2.53 (sub 1) Build' --> '2_53_1' +# "_".join(str(v) for v in bpy.app.version) +# custom blender vars +blender_srcdir=$(dirname $0)/../../ +blender_version=$(grep BLENDER_VERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | tr -dc 0-9) +blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | tr -dc 0-9) +BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)_$blender_subversion + +BLENDER_VERSION=`$BLENDER --version | cut -f2-4 -d" " | sed 's/(//g' | sed 's/)//g' | sed 's/ sub /./g' | sed 's/\./_/g'` +SSH_UPLOAD_FULL=$SSH_UPLOAD/"blender_python_api_"$BLENDER_VERSION + +SPHINXBASE=doc/python_api/ + +# dont delete existing docs, now partial updates are used for quick builds. +$BLENDER --background --python $SPHINXBASE/sphinx_doc_gen.py + +# html +sphinx-build $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out +cp $SPHINXBASE/sphinx-out/contents.html $SPHINXBASE/sphinx-out/index.html +ssh ideasman42@emo.blender.org 'rm -rf '$SSH_UPLOAD_FULL'/*' +rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/* $SSH_HOST:$SSH_UPLOAD_FULL/ + +# pdf +sphinx-build -b latex $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out +cd $SPHINXBASE/sphinx-out +make +cd - +rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/contents.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf |