Imported from antiword-0.37.tar.gz.
[antiword.git] / Docs / Mozilla
blobb1f1f82eff0d9fe6b38633d7af4561db94002f2b
1 Date: Mon, 11 Nov 2002 11:36:21 +0000
2 From: Cam <camilo@mesias.co.uk>
3 Subject: Re: antiword
5 Hi
7 I have updated the script for the latest Mozilla with plugger, as found 
8 in RedHat 8. This makes the default action a very quick text view of a 
9 document, much better IMHO than starting ooffice or abiword. If users 
10 want to edit the file they can still save as.
12 Here is a slightly improved script for gnome users:
14 #!/bin/bash
16 tmpfile=/tmp/aw$$.txt
18 lastditch=`which vi`
20 editor=${EDITOR:-$lastditch}
22 if [ ! -x $editor ] ; then
23    editor=$lastditch
27 tmpfile=/tmp/aw$$.txt
29 gtopts="-t antiword-helper --hide-menubar"
31 antiword "$1" > $tmpfile
32 chmod -w $tmpfile
33 gnome-terminal $gtopts -x $editor $tmpfile ; chmod +w $tmpfile ; rm $tmpfile
37 Here is the script for non-gnome users:
39 #!/bin/bash
41 tmpfile=/tmp/aw$$.txt
43 lastditch=`which vi`
45 editor=${EDITOR:-$lastditch}
47 if [ ! -x $editor ] ; then
48    editor=$lastditch
52 antiword "$1" > $tmpfile
53 chmod -w $tmpfile
54 xterm -T "antiword-helper" -e $editor $tmpfile
55 chmod +w $tmpfile
56 rm $tmpfile
60 To use the scripts add an entry into your plugger config file 
61 (pluggerrc, for locations check man plugger). Mine is in 
62 /home/cxm/.netscape/pluggerrc:
64 The line to add is (it has a leading tab):
66    ignore_errors exits: antiword-helper "$file"
69 Here is my config file after I added the line
71 application/rtf: rtf: Rich Text Format
72 application/x-msword: doc, dot: Microsoft Word Document
73 application/msword: doc, dot: Microsoft Word Document
74          ignore_errors exits: antiword-helper "$file"
75          nokill exits: oowriter "$file"
76          repeat swallow(AbiWord) fill: AbiWord -nosplash -geometry 
77 +9000+9000 "$file" >/dev/null 2>/dev/null
78          repeat swallow(PCFileViewer) fill: sdtpcv "$file"
79          repeat swallow(PCFileViewer) fill: /opt/SUNWdtpcv/bin/sdtpcv 
80 "$file"
83 Then start Mozilla / Netscape and you should be able to quickly view 
84 word docs from the browser and as email attachments.
86 Hope that helps,
88 -Cam