mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
update lua class documentation scripts
This commit is contained in:
parent
49656a2d7c
commit
121cd66fd6
2 changed files with 21 additions and 6 deletions
|
|
@ -34,6 +34,7 @@ foreach (json_decode ($json, true) as $b) {
|
||||||
if (isset ($b['version'])) { $ardourversion = $b['version']; }
|
if (isset ($b['version'])) { $ardourversion = $b['version']; }
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
$b ['lua'] = preg_replace ('/:_end/', ':end', $b ['lua']);
|
||||||
$b ['ldec'] = preg_replace ('/ const/', '', preg_replace ('/ const&/', '', $b['decl']));
|
$b ['ldec'] = preg_replace ('/ const/', '', preg_replace ('/ const&/', '', $b['decl']));
|
||||||
if (isset ($b['ret'])) {
|
if (isset ($b['ret'])) {
|
||||||
$b['ret'] = preg_replace ('/ const/', '', preg_replace ('/ const&/', '', $b['ret']));
|
$b['ret'] = preg_replace ('/ const/', '', preg_replace ('/ const&/', '', $b['ret']));
|
||||||
|
|
@ -125,7 +126,7 @@ function stripclass ($classname, $name) {
|
||||||
function datatype ($decl) {
|
function datatype ($decl) {
|
||||||
# TODO handle spaces in type. Works because
|
# TODO handle spaces in type. Works because
|
||||||
# we don't yet have templated types (with_space <here >)
|
# we don't yet have templated types (with_space <here >)
|
||||||
return substr ($decl, 0, strpos ($decl, ' '));
|
return substr ($decl, 0, strrpos ($decl, ' '));
|
||||||
}
|
}
|
||||||
|
|
||||||
function luafn2class ($lua) {
|
function luafn2class ($lua) {
|
||||||
|
|
@ -342,6 +343,18 @@ foreach ($doc as $b) {
|
||||||
'cand' => canonical_decl ($b)
|
'cand' => canonical_decl ($b)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
case "Free C Function":
|
||||||
|
$funclist[luafn2class ($b['lua'])][] = array (
|
||||||
|
'bind' => $b,
|
||||||
|
'name' => $b['lua'],
|
||||||
|
'args' => $args,
|
||||||
|
'ret' => $ret,
|
||||||
|
'ref' => false,
|
||||||
|
'ext' => true,
|
||||||
|
'cand' => str_replace (':', '::', $b['lua']).'(lua_State*)'
|
||||||
|
);
|
||||||
|
fwrite (STDERR, print_r ($b, true));
|
||||||
|
break;
|
||||||
case "Free Function":
|
case "Free Function":
|
||||||
case "Free Function RefReturn":
|
case "Free Function RefReturn":
|
||||||
$funclist[luafn2class ($b['lua'])][] = array (
|
$funclist[luafn2class ($b['lua'])][] = array (
|
||||||
|
|
@ -947,6 +960,7 @@ echo '</ul>'.NL;
|
||||||
|
|
||||||
# see how far there is still to go...
|
# see how far there is still to go...
|
||||||
fwrite (STDERR, "Found $dox_found annotations. missing: $dox_miss\n");
|
fwrite (STDERR, "Found $dox_found annotations. missing: $dox_miss\n");
|
||||||
|
echo '<!-- '.$dox_found.' / '.$dox_miss.' !-->'.NL;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -2,23 +2,24 @@
|
||||||
## ardour needs to be configured with --luadoc and build should be up-to date.
|
## ardour needs to be configured with --luadoc and build should be up-to date.
|
||||||
|
|
||||||
cd `dirname $0`
|
cd `dirname $0`
|
||||||
|
DIR=`pwd`
|
||||||
set -e
|
set -e
|
||||||
test -f ../libs/ardour/ardour/ardour.h
|
test -f ../libs/ardour/ardour/ardour.h
|
||||||
test -e ../gtk2_ardour/arluadoc
|
test -e ../gtk2_ardour/arluadoc
|
||||||
test -e ../build/gtk2_ardour/luadoc
|
test -e ../build/gtk2_ardour/luadoc
|
||||||
|
|
||||||
# generate ../doc/luadoc.json.gz
|
|
||||||
../gtk2_ardour/arluadoc
|
|
||||||
|
|
||||||
# generate ../doc/ardourapi.json.gz
|
# generate ../doc/ardourapi.json.gz
|
||||||
./doxy2json/ardourdoc.sh
|
./doxy2json/ardourdoc.sh
|
||||||
|
|
||||||
|
# generate ../doc/luadoc.json.gz
|
||||||
|
$DIR/../gtk2_ardour/arluadoc
|
||||||
|
|
||||||
if test -f $HOME/src/ardour-manual/_manual/24_lua-scripting/02_class_reference.html; then
|
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
|
php $DIR/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
|
ls -l $HOME/src/ardour-manual/_manual/24_lua-scripting/02_class_reference.html
|
||||||
cd $HOME/src/ardour-manual/
|
cd $HOME/src/ardour-manual/
|
||||||
./build.rb
|
./build.rb
|
||||||
else
|
else
|
||||||
php fmt-luadoc.php > /tmp/luadoc.html
|
php $DIR/fmt-luadoc.php > /tmp/luadoc.html
|
||||||
ls -l /tmp/luadoc.html
|
ls -l /tmp/luadoc.html
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue