[liblouis-liblouisxml] [liblouisxml commit] r14 - in trunk: . tools

  • From: codesite-noreply@xxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Thu, 08 Jan 2009 09:54:11 +0000

Author: christian.egli@xxxxxxxxxxxxxx
Date: Thu Jan  8 00:31:47 2009
New Revision: 14

Added:
   trunk/tools/msword2brl.in   (contents, props changed)
Removed:
   trunk/tools/msword2brl
Modified:
   trunk/configure.ac

Log:
Added usage message to msword2brl and generate version string with autoconf

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Thu Jan  8 00:31:47 2009
@@ -59,7 +59,10 @@
                  lbx_files/Makefile
                  liblouisxml/Makefile
                  tests/Makefile
-               liblouisxml.pc
+                liblouisxml.pc
                  tools/Makefile])
+
+AC_CONFIG_FILES([tools/msword2brl], [chmod +x tools/msword2brl])
+
 AC_OUTPUT


Added: trunk/tools/msword2brl.in
==============================================================================
--- (empty file)
+++ trunk/tools/msword2brl.in   Thu Jan  8 00:31:47 2009
@@ -0,0 +1,44 @@
+#! /bin/bash
+
+usage () {
+  cat <<"EOF"
+
+msword2brl infile outfile
+
+Infile must be a Microsoft Word file. The script first calls the
+`antiword' program, so you must have this installed on your machine.
+`antiword' is called with `-x db', which causes the output to be in
+docbook format. This is piped to `xml2brl'. The output file from
+`xml2brl' contains much of the formatting, including emphasis, of the
+word file.
+EOF
+}
+
+version () {
+    cat <<EOF
+$(basename $0) @VERSION@
+Copyright (C) 2004-2007 ViewPlus Technologies, Inc.
+Copyright (C) 2007,2008 JJB Software, Inc.
+License LGPL: GNU LGPL <http://gnu.org/licenses/lgpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Written by John J. Boyer
+EOF
+}
+
+while [ $# -gt 0 ]; do
+  case "$1" in
+    -h | --help | -help )
+      usage
+      exit 0 ;;
+    --version )
+      version
+      exit 0 ;;
+    * )
+      break ;;
+  esac
+done
+
+antiword -x db $1 | xml2brl >$2
+
For a description of the software and to download it go to
http://www.jjb-software.com

Other related posts:

  • » [liblouis-liblouisxml] [liblouisxml commit] r14 - in trunk: . tools - codesite-noreply