From 7496a856c7785888327146c9934e5db23ba5f155 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 29 Aug 2019 05:42:46 +0200 Subject: [PATCH] Tweak Lua-doc processing: Separate PHP based post-processing, used for manual creation. php-cli may not be available on build host. --- tools/doxy2json/ardourdoc.sh | 41 ++++------------------------- tools/doxy2json/postproc.sh | 51 ++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 36 deletions(-) create mode 100755 tools/doxy2json/postproc.sh diff --git a/tools/doxy2json/ardourdoc.sh b/tools/doxy2json/ardourdoc.sh index 8237641bd0..975235dc51 100755 --- a/tools/doxy2json/ardourdoc.sh +++ b/tools/doxy2json/ardourdoc.sh @@ -38,39 +38,8 @@ time ./tools/doxy2json/doxy2json -j 4 \ ls -lh $TMPFILE -echo "# consolidating JSON" -php << EOF - \$a) { - \$jout[] = \$a; -} -file_put_contents('doc/ardourapi.json.gz', gzencode (json_encode (\$jout, JSON_PRETTY_PRINT))); -EOF - -ls -l doc/ardourapi.json.gz +if test -z "$1"; then + ./tools/doxy2json/postproc.sh $TMPFILE +else + cp -vi $TMPFILE doc/ardourapi-pre.json +fi diff --git a/tools/doxy2json/postproc.sh b/tools/doxy2json/postproc.sh new file mode 100755 index 0000000000..6c74d5ff78 --- /dev/null +++ b/tools/doxy2json/postproc.sh @@ -0,0 +1,51 @@ +#!/bin/bash +cd `dirname $0` +cd ../.. + +set -e + +test -f "$1" + +echo "# consolidating JSON $1" +php << EOF + \$a) { + \$jout[] = \$a; +} +file_put_contents('doc/ardourapi.json.gz', gzencode (json_encode (\$jout, JSON_PRETTY_PRINT))); +EOF + +ls -l doc/ardourapi.json.gz