From 1149eeca5dae513b51fc521252e8c36803dbbf80 Mon Sep 17 00:00:00 2001 From: gggeek Date: Thu, 9 Feb 2023 22:00:24 +0000 Subject: [PATCH] improve api docs --- doc/build/taskfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/build/taskfile b/doc/build/taskfile index cb1317b7..a9e3e1c8 100755 --- a/doc/build/taskfile +++ b/doc/build/taskfile @@ -79,7 +79,17 @@ function build_api() { $PHPDOC run --cache-folder 'build/.phpdoc' -d "$(realpath ../src/)" -t 'api' --title PHPXMLRPC --defaultpackagename PHPXMLRPC - # @todo manually mangle the index.html file to add generation date, lib version, etc... + # manually mangle the index.html file to add generation date, lib version, etc... + TAG=$(grep 'public \+static \+$xmlrpcVersion *=' ../src/PhpXmlRpc.php | sed 's/public \+static \+$xmlrpcVersion *= *//' | tr -d ' ' | tr -d \" | tr -d ';' | tr -d "'") + sed -r -i -e "s|

Documentation

|

Documentation for the PHPXMLRPC library, ver. ${TAG}

Built on $(date +%Y/%m/%d)

|g" ./api/index.html + find api -name '*.html' xargs sed -r -i -e 's|||g' + find api -name '*.html' | xargs sed -r -i -e "s|>PHPXMLRPC|>PHPXMLRPC ${TAG}|g" + #find api -name '*.html' | fgrep -v 'api/index.html' | xargs sed -r -i -e "s|...|...|g" + + if [ ! -d api/images ]; then + mkdir api/images + fi + cp ../debugger/favicon.ico api/images } function build_manual() { -- 2.47.0