From 5e2c9f8ef8dd97f95a6da56ea1d6fea7bd89b611 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 6 Apr 2016 18:23:25 +0200 Subject: [PATCH] lua-doc: generate ardour-manual (template) directly --- tools/fmt-luadoc.php | 40 +++++++++++++++++++++++++++++++++++----- tools/update_luadoc.sh | 12 +++++++++--- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/tools/fmt-luadoc.php b/tools/fmt-luadoc.php index 712c8b0887..2656b7e330 100755 --- a/tools/fmt-luadoc.php +++ b/tools/fmt-luadoc.php @@ -16,6 +16,13 @@ # php tools/fmt-luadoc.php > /tmp/luadoc.html # +$options = getopt("m"); +if (isset ($options['m'])) { + $HTMLOUTPUT = false; ## set to false to output ardour-manual +} else { + $HTMLOUTPUT = true; ## set to false to output ardour-manual +} + ################################################################################ ################################################################################ @@ -642,6 +649,8 @@ function format_class_members ($ns, $cl, &$dups) { ################################################################################ # Start Output +if ($HTMLOUTPUT) { + ?> @@ -705,7 +714,26 @@ div.luafooter { text-align:center; font-size:80%; color: #888; margin: 2em

- + + + +--- +layout: default +style: luadoc +title: Class Reference +--- + +

+This documention is far from complete may be inaccurate and subject to change. +

+ +
@@ -923,8 +951,10 @@ fwrite (STDERR, "Found $dox_found annotations. missing: $dox_miss\n"); ?>
Ardour  - 
+ - - - +if ($HTMLOUTPUT) { + echo ''.NL; + echo ''.NL; + echo ''.NL; +} diff --git a/tools/update_luadoc.sh b/tools/update_luadoc.sh index 09482761fb..e1a5e24eb8 100755 --- a/tools/update_luadoc.sh +++ b/tools/update_luadoc.sh @@ -13,6 +13,12 @@ test -e ../build/gtk2_ardour/luadoc # generate ../doc/ardourapi.json.gz ./doxy2json/ardourdoc.sh -php fmt-luadoc.php > /tmp/luadoc.html -# ^^ needs manual copy to ardour-manual -ls -l /tmp/luadoc.html +if test -f $HOME/src/ardour-manual/_manual/24_lua-scripting/02_class_reference.html; then + php fmt-luadoc.php -m > $HOME/src/ardour-manual/_manual/24_lua-scripting/02_class_reference.html + ls -l $HOME/src/ardour-manual/_manual/24_lua-scripting/02_class_reference.html + cd $HOME/src/ardour-manual/ + ./build.rb +else + php fmt-luadoc.php > /tmp/luadoc.html + ls -l /tmp/luadoc.html +fi