nmh-workers
[Top] [All Lists]

[Nmh-workers] .mh_profile entry for: Content-Disposition: inline; filename="...

2015-03-01 14:44:52
Thanks for all your work!  Been using mh or nmh fron commandline since
the early '90s.  I'm on 1.5 on Linux, looking forward to nmh 1.6.
--

Pls see the mime snip after my sig. To deal with *.jpg I have this
line in .mh_profile:

  mhshow-show-image/jpg: %l mhn_show_by_save_with_orig_name '%f' '%a' 
/home/myusrname/tmp/mh

Where mhn_show_by_save_with_orig_name is a shell script that saves the
attachment to dir /home/myusrname/tmp/mh.

Normally %a has name=BASENAMEHERE, but for this case %a is empty.  How
might I get the "Photo from Feb 2015 Photo Stream.jpg" value to 
mhn_show_by_save_with_orig_name ?

--
thanks,
Tom
--
Troublesome attachment:

  Content-Type: image/jpg
  MIME-Version: 1.0
  Content-Transfer-Encoding: base64
  Content-ID: <image89D95841-DBD4-4702-85F0-EA64047F4A97>
  Content-Disposition: inline; filename="Photo from Feb 2015 Photo Stream.jpg"

  /9j/4AAQSkZJRgABAQEASABIAAD/4QBMRXhpZgAATU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAA
--snip

snip from man mhshow:
 
  The display string may contain the following escapes:

       %a           Insert parameters from Content-Type field
       %{parameter} Insert the parameter value from the Content-Type field
       %f           Insert filename containing content
       %F           %f, and stdin is terminal not content
       %l           display listing prior to displaying content
       %s           Insert content subtype
       %d           Insert content description
       %%           Insert the character %

  Mhshow will execute at most one display string at any given  time,  and
  wait  for the current display string to finish execution before execut-
  ing the next display string.

  The {parameter} escape is typically used in  a  command  line  argument       
 
  that should only be present if it has a non-null value.  Its value will 
  be wrapped with single quotes if the escape is not so  wrapped.   Shell
  parameter  expansion  can  construct  the argument only when it is non-
  null, e.g.,

       mhshow-show-text/html: charset=%{charset};


_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>