On 24Apr2015 17:35, martin f krafft <[email protected]> wrote:
I am seeking the ability to invoke a command on a MIME attachment
which is not <view-attach>. Simple example: <view-attach> on a PNG
file might open xview with the temporary file, but sometimes I'd
like to load an attachment (the temporary file) in Gimp to be able
to edit and save-as to somewhere else.
[...]

I wrap all my mailcap commands with my apphelper script, which itself is wrapped in my shorter-named "ah" script. My mailcaps look like this:

 application/pdf; ah %s -1 xpdf; gui
 image/jpg; ah %s -1 xv; gui
 image/tiff; ah %s -1 gm display; gui

and so forth. As you can see, the viewer is mentioned at the end.

What does apphelper do?

It runs the viewer command, and also offers to save the file with useful defaults (remembers the last save dir, etc). You can also use a shell escape to run an arbitrary _other_ command on the file.

Links:

 blurb:
   http://www.cskk.ezoshosting.com/cs/css/apphelper.html

 source:
   https://bitbucket.org/cameron_simpson/css/src/tip/bin/apphelper
   https://bitbucket.org/cameron_simpson/css/src/tip/bin-cs/ah

 man page:
   http://www.cskk.ezoshosting.com/cs/css/manuals/apphelper.1.html

Let me know if you want further detail or help.

Cheers,
Cameron Simpson <[email protected]>

Drink coffee. Do stupid things faster with more energy.
https://secure.flickr.com/photos/lantanaland/6224396556/

Reply via email to