lua-doc: generate ardour-manual (template) directly

This commit is contained in:
Robin Gareus 2016-04-06 18:23:25 +02:00
parent 563b792b57
commit 5e2c9f8ef8
2 changed files with 44 additions and 8 deletions

View File

@ -16,6 +16,13 @@
# php tools/fmt-luadoc.php > /tmp/luadoc.html # 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 # Start Output
if ($HTMLOUTPUT) {
?><!DOCTYPE html> ?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
@ -705,7 +714,26 @@ div.luafooter { text-align:center; font-size:80%; color: #888; margin: 2em
</p> </p>
</div> </div>
<!-- #### SNIP #### !--> <!-- #### SNIP #### !-->
<?php
} else {
?>
---
layout: default
style: luadoc
title: Class Reference
---
<p class="warning">
This documention is far from complete may be inaccurate and subject to change.
</p>
<?php
}
?>
<div id="luaref"> <div id="luaref">
@ -923,8 +951,10 @@ fwrite (STDERR, "Found $dox_found annotations. missing: $dox_miss\n");
?> ?>
</div> </div>
<div class="luafooter">Ardour <?=$ardourversion?> &nbsp;-&nbsp; <?=date('r')?></div> <div class="luafooter">Ardour <?=$ardourversion?> &nbsp;-&nbsp; <?=date('r')?></div>
<?php
<!-- #### SNIP #### !--> if ($HTMLOUTPUT) {
echo '<!-- #### SNIP #### !-->'.NL;
</body> echo '</body>'.NL;
</html> echo '</html>'.NL;
}

View File

@ -13,6 +13,12 @@ test -e ../build/gtk2_ardour/luadoc
# generate ../doc/ardourapi.json.gz # generate ../doc/ardourapi.json.gz
./doxy2json/ardourdoc.sh ./doxy2json/ardourdoc.sh
php fmt-luadoc.php > /tmp/luadoc.html if test -f $HOME/src/ardour-manual/_manual/24_lua-scripting/02_class_reference.html; then
# ^^ needs manual copy to ardour-manual php fmt-luadoc.php -m > $HOME/src/ardour-manual/_manual/24_lua-scripting/02_class_reference.html
ls -l /tmp/luadoc.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