diff options
author | William Jon McCann <mccann@jhu.edu> | 2007-03-09 11:40:59 -0500 |
---|---|---|
committer | William Jon McCann <mccann@jhu.edu> | 2007-03-09 11:40:59 -0500 |
commit | 1d72374535de222cb816c74506555c71af10d429 (patch) | |
tree | 95426aec469fd9d37308d59f743c440af1069ecf /doc/docize-dbus-xml.sh | |
parent | 15ad40c8d8abd86a4b83e445031fd467406b45d8 (diff) |
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.
Diffstat (limited to 'doc/docize-dbus-xml.sh')
-rwxr-xr-x | doc/docize-dbus-xml.sh | 34 |
1 files changed, 34 insertions, 0 deletions
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 |