[ale] mailcap hacking?

Geoffrey esoteric at 3times25.net
Thu Apr 22 15:19:03 EDT 2004


Fulton Green wrote:
> On Thu, Apr 22, 2004 at 02:46:24PM -0400, Geoffrey wrote:
> 
>>Fulton Green wrote:
>>
>>>I've gotten several emails in the past few days with Acrobat/PDF
>>>attachments.  Since my email reader is Mutt, accessed remotely, I don't
>>>really have an option to launch a GUI-borne PDF reader.  So has anyone
>>>out there heard of a character-mode PDF reader for full-screen consoles? 
>>
>>There's the conversion tool, pdftotext you might check out.
>>
>>pdftotext foo.pdf
>>
>>generates
>>
>>foo.txt
> 
> 
> Thanks; that will definitely do it.  The trick now is to get Mutt to
> run it.
> 
> Mut appears to be using mailcap for content disposition.  If the files
> were being sent as application/pdf, I'd be able to get Mutt to
> automatically launch the PDF reader.  Unfortunately, the content type
> for the file is application/octet-stream, which could be pretty much
> anything.  I don't think there is a way for mailcap to tell it to "launch
> pdf2text if the file extension is .pdf".

I thing your problem will be that it outputs to a file, not standard 
out.  I tried pdftotext < foo.pdf but it didn't like that.  Poor 
programming...

-- 
Until later, Geoffrey                     Registered Linux User #108567
Building secure systems in spite of Microsoft



More information about the Ale mailing list