13
0

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
#
$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) {
?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
@ -707,6 +716,25 @@ div.luafooter { text-align:center; font-size:80%; color: #888; margin: 2em
<!-- #### 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">
<?php
@ -923,8 +951,10 @@ fwrite (STDERR, "Found $dox_found annotations. missing: $dox_miss\n");
?>
</div>
<div class="luafooter">Ardour <?=$ardourversion?> &nbsp;-&nbsp; <?=date('r')?></div>
<?php
<!-- #### SNIP #### !-->
</body>
</html>
if ($HTMLOUTPUT) {
echo '<!-- #### SNIP #### !-->'.NL;
echo '</body>'.NL;
echo '</html>'.NL;
}

View File

@ -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