Utility to add the stylesheet "s0" definition to an RTF file.
authorThomas G. Lockhart
Fri, 6 Apr 2001 15:01:25 +0000 (15:01 +0000)
committerThomas G. Lockhart
Fri, 6 Apr 2001 15:01:25 +0000 (15:01 +0000)
 This stylesheet must be present for Applixware to be happy generating
 a ToC. M$Word does not seem to care one way or the other.

doc/src/sgml/fixrtf [new file with mode: 0755]

diff --git a/doc/src/sgml/fixrtf b/doc/src/sgml/fixrtf
new file mode 100755 (executable)
index 0000000..a6a701f
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+# fixrtf
+# Repair (slightly) damaged RTF generated by jade
+# Applixware wants the s0 stylesheet defined, whereas
+#  M$Word does not care about it.
+# (c) 2001, Thomas Lockhart, PostgreSQL Inc.
+
+flist=$@
+if [ "$flist" = "" ] ; then
+  flist=*.rtf
+fi
+
+for f in $flist ; do
+  echo -n "Repairing $f..."
+  if [ -r $f ] ; then
+    (sed 's/{\\stylesheet{\\s1/{\\stylesheet{\\s0 Normal 0;}{\\s1/g' $f > $f.new \
+      && mv -f $f.new $f \
+      && echo " done") || echo " failed"
+  else
+    echo " file not found"
+  fi
+done
+exit