On Thu, Jul 22, 1999 at 06:52:55AM -0400, David Thorburn-Gundlach wrote:
> Alex --
> 
> ...and then Alex Lane said...
> % All,
> %    My understanding is that mailcap will allow you to configure 
> % things so that you can view mail attachments.
> 
> Yep; that's the idea.
> 
> 
> %    What can I do to automatically convert encoded attachments 
> % into files? In particular, many people send me MS Word files, and
> 
> As I understand the mailcap file, you specify the MIME type, and then
> the program to "view" it, and then any options (like copiousoutput,
> for instance).
> 
> What you want to do with your "viewer" is save the attachment as a
> file.  So either make your viewer be a one-liner embedded in the
> mailcap line, like
> 
>       application/msword; cat '%s' > /some/temp/file;
> 
> or whip up a little script about like
> 
>       #!/bin/sh
>       # yes, I'm still old fashioned
>       WRITEDIR=/path/to/some/dir
>       OUTFILE=mailcap.dump.$$
>       while [ -f $WRITEDIR/$OUTFILE ] ; do OUTFILE=$OUTFILE.$$ ; done
>       cat > $WRITEDIR/$OUTFILE
>       echo "$WRITEDIR/$OUTFILE created"
> 
> and have your mailcap entry look like
> 
>       application/msword; /path/to/that/script < '%s';
> 
I do not see where this gets you beyond saving directly from the
attachment window. Am I being thick?
 
> % I'd like to be able to access such files via my local network from
> % my Windoze box.
> 
> Eewwww...  I do see your point, but it just seems, well, so *icky* ;-)
> 

Well, Yes, it is so *icky* but we live in the real world and lots of 
people at my university think things can only be written on computers
in Word. My current method is:-

1. In the pager, use catdoc. This is sufficient to recognise that 90%
of the mail I receive with Word attachments are rubbish and can be 
trashed.

2. In the attachment menu send the file to a dummy script that basically
says "Hit enter to continue:" and waits until you do. While it waits the
file is in /tmp. I run samba and have the tmp share open on the PC in
a window. Pull down view menu in this window to refresh. You now see
a MSWord icon for the file. Double click and MS Word comes up. Great.

The trouble is:-

3. On a Dec Alpha this works fine and the file is loaded into Word. On
a IBM RS6000, it just says it can not open the file. I have no idea why.
However, you can move the icon to the desk top and open it from there. 
You then have to move the icon later to trash. The same thing happens with
Excel files but rtf files work fine opening in Word.

Anyone got a better method? There is open.pl and docserver.exe on several
mutt web pages but I can not get them to work.

Cheers, Brian. 

-- 
        Associate Professor Brian Salter-Duke (Brian Duke)
Chemistry, Faculty of Science, IT and Education, Northern Territory University,
  Darwin, NT 0909, Australia.  Phone 08-89466702. Fax 08-89466847
[EMAIL PROTECTED]  http://www.smps.ntu.edu.au/chemistry/compchem.html

Reply via email to