[Xfce4-commits] <xfce4-docs:xfce4-panel-master> Add two script to help doc writers.

Nick Schermer noreply at xfce.org
Sat Feb 26 12:00:01 CET 2011


Updating branch refs/heads/xfce4-panel-master
         to 44fd3376da967db0c6fb18b0515b249411b1dc71 (commit)
       from 11667d5582a8898098cfd2304acc90a0ed5ab5e5 (commit)

commit 44fd3376da967db0c6fb18b0515b249411b1dc71
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Feb 26 11:57:58 2011 +0100

    Add two script to help doc writers.

 tools/buildhtml.sh |   28 ++++++++++++++++++++++++++++
 tools/updatepo.sh  |   26 ++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/tools/buildhtml.sh b/tools/buildhtml.sh
new file mode 100755
index 0000000..7cd2ae5
--- /dev/null
+++ b/tools/buildhtml.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+srcdir=$(dirname $(pwd))
+tmpdir="/tmp/xfce4-panel-master"
+
+if test -f "$srcdir/index.page"
+then
+  pushd $srcdir 1> /dev/null
+
+  echo "Creating tmp..."
+  rm -r "$tmpdir" &> /dev/null
+  mkdir $tmpdir
+  
+  echo "Generating CSS file..."
+  gnome-doc-tool css -o "$tmpdir/stylesheet.css" "index.page"
+  
+  echo "Symlink for figures..."
+  ln -s "$srcdir/figures" "$tmpdir/figures"
+  
+  echo "Generating HTML pages..."
+  gnome-doc-tool html -n -c "stylesheet.css" -o "$tmpdir/" "./"
+  
+  echo "Done. Files located in file://$tmpdir/index.html"
+
+  popd 1> /dev/null
+else
+  echo "ERROR: no index.page file found"
+fi
diff --git a/tools/updatepo.sh b/tools/updatepo.sh
new file mode 100755
index 0000000..c426116
--- /dev/null
+++ b/tools/updatepo.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+srcdir=$(dirname $(pwd))
+potfile="xfce4-panel.pot"
+
+if test -f "$srcdir/po/$potfile";
+then
+  pushd $srcdir 1> /dev/null
+  
+  mallardpages=$(echo *.page)
+  
+  echo "Regenerating pot file..."
+  rm "po/$potfile"
+  xml2po -o "po/$potfile" $mallardpages
+  
+  linguas=$(cd po && echo `/bin/ls *.po | sed 's,[.]po,,g'`) &> /dev/null
+  for lang in $linguas
+  do
+    xml2po -u "po/$lang.po" $mallardpages
+  done
+  
+  popd 1> /dev/null
+else
+  echo "ERROR: Pot file \"$potfile\" no found!"
+fi
+



More information about the Xfce4-commits mailing list