doc2pdf

Katrin Wolf missmarple at gmx.net
Thu Mar 10 15:08:24 UTC 2005


Am Donnerstag, 10. März 2005 15:47 schrieb Trey Sizemore:

> I'd like to see that script, if you don't mind.  Sounds very useful.

OK, here it is - nothing special:

----------------------------------------------------------------------------
#!/bin/bash
# modified deword-script, original from
# Blake Hannaford (blake at ee.washington.edu )
#
# Katrin Wolf (http://www.missmarple-net.de)

####### CONFIG  ##################
ANTI_WORD_PATH=/usr/bin/antiword
GV_VIEWER=/usr/bin/X11/gv
TXT_VIEWER=/usr/bin/kate

DEFAULT_OUTPUT="ps"     #value should be "ps" (postscript) or "txt" (text)

PAPER_SIZE="a4"         #value should be "a4", "letter" or "legal",
                        #this option is only needed for postscript output

OPTIONS=""              #values for further options for postscript output
                        #see man page of antiword for details


####################################
if [ ! -n "$1" ]
then
  echo "Usage: deword file.doc"
    exit 65
fi

if [ $DEFAULT_OUTPUT = 'txt' ]
then
        $ANTI_WORD_PATH -t "$1" > /tmp/t$$.txt
        $TXT_VIEWER /tmp/t$$.txt
        rm /tmp/t$$.txt
else
        $ANTI_WORD_PATH -p $PAPER_SIZE $OPTIONS "$1" > /tmp/t$$.ps
        $GV_VIEWER /tmp/t$$.ps
        rm /tmp/t$$.ps

------------------------------------------------------------------------------------

Cheers
Katrin
-- 
http://mm.smile-to-me.de
GnuPG Key-ID: 48507D0F 
ICQ #72094493
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050310/c867f22d/attachment.sig>


More information about the ubuntu-users mailing list