Viewing Microsoft Docs in Pine


There is a program called antiword that can be used to view the text in Microsoft Word files. This program doesn't include any formatting or other text features, but does display the text nicely. To call it from pine, a change needs to be made to your mailcap file. My addtion looks like this:

application/msword;/usr/local/bin/antiword %s > /tmp/tmpword|xterm -e more /tmp/tmpword; \

What this does is first run antiword on the doc file and put the plain text into a file called xxxword in /tmp. Then it brings up a new xterm and runs the more command on the file /tmp/xxxword. The reason that I did it in two steps is that xterm -e antiword ... wouldn't work. It would just flash the file rather quickly. And it didn't matter if I included the more command or not, it flashed too fast to read. The command above creates a temporary file that can be deleted later, or is there to be saved if I want a copy of the file.