home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / anwor032.zip / antiword.0.32 / Docs / Netscape < prev    next >
Internet Message Format  |  2001-09-28  |  4KB

  1. From: "Craig D. Miller" <Craig.D.Miller@jpl.nasa.gov>
  2.  
  3. Hi,
  4.  
  5. Steps to integrate antiword into NetScape 4.73 (should also work with earlier
  6. versions).
  7.  
  8. Programs that launch from netscape must startup an X window to display their
  9. output (otherwise output ends up it the bit bucket on your system).  I wrote the
  10. following script to do this for antiword (and saved it as
  11. "/usr/local/bin/xantiword":
  12.  
  13. #!/bin/csh -f
  14. setenv FILE $1
  15. setenv NEWFILE ${FILE}.xantiword
  16. /usr/local/bin/antiword $FILE >&$NEWFILE
  17. /usr/bin/X11/xterm -title "$FILE (MS Word)" -e /usr/bsd/more $NEWFILE
  18. rm -f $NEWFILE
  19.  
  20. The above script works, but may not be the best way to do it.  If you come up
  21. with a more elegant solution, then please let me know.
  22.  
  23. Next you'll have to tell netscape to execute the "/usr/local/bin/xantiword"
  24. script when word documents are clicked on.  The easiest way to do this is to
  25. change the /usr/local/lib/netscape/mailcap netscape configuration file.  For
  26. SGI version of netscape the following two lines are changed.  For other versions
  27. of netscape, one should find similar lines or will need to add the new lines.
  28.  
  29. Old lines (try to run SoftWindows, which is not installed on my system):
  30.  
  31.     application/x-dos_ms_word; /usr/local/lib/netscape/swinexec %s winword; \
  32.         description="Microsoft Word-for-Windows Document";
  33.     application/msword; /usr/local/lib/netscape/swinexec %s winword; \
  34.         description="Microsoft Word-for-Windows Document";
  35.  
  36. New lines (for antiword execution), which replace old lines on my system:
  37.  
  38.     application/x-dos_ms_word; /usr/local/bin/xantiword %s; \
  39.         description="Microsoft Word-for-Windows Document";
  40.     application/msword; /usr/local/bin/xantiword %s; \
  41.         description="Microsoft Word-for-Windows Document";
  42.  
  43. These changes can also be made via the netscape preferences, under
  44. Navigator/Applications, but then the changes would only be for the user that
  45. changed them.  The above change to the mailcap file affects all users, which is
  46. what you'll usually want.
  47.  
  48.  Note that the above file paths may be different for your system.  On our linux
  49. box, a quick search DID NOT show where the mailcap for netscape was stored, but
  50. I did find one in /etc/mailcap.  I don't have time to experiment to see if this
  51. is the same one that netscape uses.
  52.  
  53. If you have questions then please E-mail me.
  54.  
  55. - Craig
  56.  
  57. ===============================================================================
  58.  
  59. From: "Craig D. Miller" <Craig.D.Miller@jpl.nasa.gov>
  60.  
  61. Hi,
  62.  
  63. I just discovered a program called "xless".  It would actually be easier to use
  64. than my previous xterm/more solution.  To use it change the
  65. "/usr/local/bin/xantiword" script to: 
  66.  
  67. #!/bin/csh -f
  68. setenv FILE $1
  69. /usr/local/bin/antiword $FILE | /usr/freeware/bin/xless \
  70.             -title "$FILE (MS Word)" -geometry 100x60
  71.  
  72. Note that one also needs to have xless installed.  It can be found on the
  73. SGI Freeware Feb 1999 (or later) CD-ROM.
  74.  
  75. - Craig
  76.  
  77. ===============================================================================
  78.  
  79. From: Bruno Crochet <bruno.crochet@pse.unige.ch>
  80.  
  81. Hi!
  82.  
  83. Another way to integrate antiword into netscape is to copy the following
  84. line in your .mailcap file :
  85.  
  86. application/msword; ns="%s"\; nf="${ns}".ps\; antiword -pa4 "${ns}" >
  87. "${nf}"\; gv "${nf}"\; sleep 2 \; rm "${nf}"
  88.  
  89. Bruno.
  90.  
  91. ===============================================================================
  92.  
  93. From: Andoni Zarate <azarate@saincotrafico.com>
  94.  
  95. In order to view the file into netscape you can write the xantiword file
  96. like this:
  97.  
  98. #!/bin/csh -f
  99. setenv FILE $1
  100. setenv NEWFILE ${FILE}.xantiword
  101. /usr/local/bin/antiword $FILE >&$NEWFILE
  102. netscape -remote 'openFile('$NEWFILE')'
  103.  
  104. Andoni Zßrate.
  105.  
  106. ===============================================================================
  107.