merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# run from the blender source dir
|
|
|
|
# bash source/blender/python/doc/sphinx_doc_gen.sh
|
2010-05-03 15:52:15 +00:00
|
|
|
# ssh upload means you need an account on the server
|
merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
|
|
|
|
|
|
|
BLENDER="./blender.bin"
|
|
|
|
SSH_HOST="ideasman42@emo.blender.org"
|
2010-09-03 09:21:40 +00:00
|
|
|
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)
|
2010-09-30 10:51:36 +00:00
|
|
|
# custom blender vars
|
2010-10-13 10:42:33 +00:00
|
|
|
blender_srcdir=$(dirname $0)/../../
|
2010-09-30 10:51:36 +00:00
|
|
|
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
|
|
|
|
|
2010-09-03 09:21:40 +00:00
|
|
|
SSH_UPLOAD_FULL=$SSH_UPLOAD/"blender_python_api_"$BLENDER_VERSION
|
merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
|
|
|
|
2010-10-13 10:42:33 +00:00
|
|
|
SPHINXBASE=doc/python_api/
|
|
|
|
|
2010-05-03 15:52:15 +00:00
|
|
|
# dont delete existing docs, now partial updates are used for quick builds.
|
2010-10-13 10:42:33 +00:00
|
|
|
$BLENDER --background --python $SPHINXBASE/sphinx_doc_gen.py
|
merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
|
|
|
|
|
|
|
# html
|
2010-10-13 10:42:33 +00:00
|
|
|
sphinx-build $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out
|
|
|
|
cp $SPHINXBASE/sphinx-out/contents.html $SPHINXBASE/sphinx-out/index.html
|
2010-09-03 09:21:40 +00:00
|
|
|
ssh ideasman42@emo.blender.org 'rm -rf '$SSH_UPLOAD_FULL'/*'
|
2010-10-13 10:42:33 +00:00
|
|
|
rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/* $SSH_HOST:$SSH_UPLOAD_FULL/
|
merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
|
|
|
|
|
|
|
# pdf
|
2010-10-13 10:42:33 +00:00
|
|
|
sphinx-build -b latex $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out
|
|
|
|
cd $SPHINXBASE/sphinx-out
|
merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
|
|
|
make
|
2010-10-13 10:42:33 +00:00
|
|
|
cd -
|
|
|
|
rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/contents.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
|