Skip to content

Commit 1149eec

Browse files
committed
improve api docs
1 parent e7bfce1 commit 1149eec

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

doc/build/taskfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,17 @@ function build_api() {
7979

8080
$PHPDOC run --cache-folder 'build/.phpdoc' -d "$(realpath ../src/)" -t 'api' --title PHPXMLRPC --defaultpackagename PHPXMLRPC
8181

82-
# @todo manually mangle the index.html file to add generation date, lib version, etc...
82+
# manually mangle the index.html file to add generation date, lib version, etc...
83+
TAG=$(grep 'public \+static \+$xmlrpcVersion *=' ../src/PhpXmlRpc.php | sed 's/public \+static \+$xmlrpcVersion *= *//' | tr -d ' ' | tr -d \" | tr -d ';' | tr -d "'")
84+
sed -r -i -e "s|<h2>Documentation</h2>|<h2>Documentation for the <a href=\"https://gggeek.github.io/phpxmlrpc/\">PHPXMLRPC</a> library, ver. ${TAG}</h2><p>Built on $(date +%Y/%m/%d)</p>|g" ./api/index.html
85+
find api -name '*.html' xargs sed -r -i -e 's|<a href="" class="phpdocumentor-title__link">|<a href="index.html" class="phpdocumentor-title__link">|g'
86+
find api -name '*.html' | xargs sed -r -i -e "s|>PHPXMLRPC</a></h1>|>PHPXMLRPC ${TAG}</a></h1>|g"
87+
#find api -name '*.html' | fgrep -v 'api/index.html' | xargs sed -r -i -e "s|...|...|g"
88+
89+
if [ ! -d api/images ]; then
90+
mkdir api/images
91+
fi
92+
cp ../debugger/favicon.ico api/images
8393
}
8494

8595
function build_manual() {

0 commit comments

Comments
 (0)