[yelp-tools] [tools/yelp-new] Local templates & use .docbook extension
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-tools] [tools/yelp-new] Local templates & use .docbook extension
- Date: Tue, 14 Dec 2010 15:04:24 +0000 (UTC)
commit c43879c460edbfc188d1490436ac671b2a86f963
Author: Shaun McCance <shaunm gnome org>
Date: Tue Dec 14 09:52:28 2010 -0500
[tools/yelp-new] Local templates & use .docbook extension
tools/yelp-new.in | 32 ++++++++++++++++++++++++++------
1 files changed, 26 insertions(+), 6 deletions(-)
---
diff --git a/tools/yelp-new.in b/tools/yelp-new.in
index 6f89e85..59f09e3 100755
--- a/tools/yelp-new.in
+++ b/tools/yelp-new.in
@@ -29,6 +29,13 @@ yelp_describe_tmpl () {
yelp_usage() {
echo "Usage: yelp-new <TEMPLATE> <ID> [TITLE]"
+ if [ -f *.page.tmpl ]; then
+ echo ""
+ echo "Local Mallard Templates:"
+ for f in *.page.tmpl; do
+ yelp_describe_tmpl "$f" "page.tmpl"
+ done
+ fi
if [ -f ${tmpldir}*.page ]; then
echo ""
echo "Mallard Templates:"
@@ -36,10 +43,17 @@ yelp_usage() {
yelp_describe_tmpl "$f" "page"
done
fi
- if [ -f ${tmpldir}*.xml ]; then
+ if [ -f *.docbook.tmpl ]; then
+ echo ""
+ echo "Local DocBook Templates:"
+ for f in *.docbook.tmpl; do
+ yelp_describe_tmpl "$f" "xml.tmpl"
+ done
+ fi
+ if [ -f ${tmpldir}*.docbook ]; then
echo ""
echo "DocBook Templates:"
- for f in ${tmpldir}*.xml; do
+ for f in ${tmpldir}*.docbook; do
yelp_describe_tmpl "$f" "xml"
done
fi
@@ -51,12 +65,18 @@ if [ $# -lt 2 ]; then
fi
# Locate the template file
-if [ -f "${tmpldir}${1}.page" ]; then
+if [ -f "${1}.page.tmpl" ]; then
+ infile="${1}.page.tmpl"
+ outext=".page"
+elif [ -f "${tmpldir}${1}.page" ]; then
infile="${tmpldir}${1}.page"
outext=".page"
-elif [ -f "${tmpldir}${1}.xml" ]; then
- infile="${tmpldir}${1}.xml"
- outext=".xml"
+elif [ -f "${1}.docbook.tmpl" ]; then
+ infile="${1}.docbook.tmpl"
+ outext=".docbook"
+elif [ -f "${tmpldir}${1}.docbook" ]; then
+ infile="${tmpldir}${1}.docbook"
+ outext=".docbook"
else
echo "Error: No template named ${1} found"
exit 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]