From 1d72374535de222cb816c74506555c71af10d429 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Fri, 9 Mar 2007 11:40:59 -0500 Subject: add a tool to autogenerate dbus object ref docs I hope I didn't reinvent a wheel but it seems to work much better than hand coding these refentries. Still need to add support for comments and actual descriptions ala gtk-doc. --- doc/docize-dbus-xml.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 doc/docize-dbus-xml.sh (limited to 'doc/docize-dbus-xml.sh') diff --git a/doc/docize-dbus-xml.sh b/doc/docize-dbus-xml.sh new file mode 100755 index 0000000..1df63e1 --- /dev/null +++ b/doc/docize-dbus-xml.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +DIST_BIN=`dirname "$0"` + +CMD=xsltproc +XSL=${DIST_BIN}/docbook-dbus.xsl + +if test "x$1" = "x" -o "x$1" = "x-h" -o "x$1" = "x--help"; then + echo "usage: $0 [file] ..." + exit 1 +fi + +if [ ! -r ${XSL} ]; then + echo "Cannot find XSLT file" + exit 1 +fi + +FILES="$@" +for FILE in $FILES; do + echo "${FILE}" | grep ".xml$" > /dev/null + if [ $? -ne 0 ]; then + echo "Skipping non-xml file: ${FILE}" + continue + fi + + d=`dirname ${FILE}` + b=`basename ${FILE} .xml` + + outfile="ref-${b}.xml" + echo "Creating: ${outfile}" + ${CMD} ${XSL} ${FILE} | tail -n +2 > ${outfile} +done + +exit 0 -- cgit