[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] What are and what should be the qualifications for a c

From: Paul Fox
Subject: Re: [Nmh-workers] What are and what should be the qualifications for a current nmh user
Date: Wed, 14 May 2014 11:17:31 -0400

address@hidden wrote:
 > So I ask: Is there an argument, I could give to show, that would emulate the
 > existence of a .mh_profile entry like:
 >      mhshow-show-text/html: %pmhshowHelper '%d' '%s' '%f'

i'm not quite sure what you're asking.  but here's what i do.  maybe
there will be ideas here.

i have several wrapper scripts for dealing with text and html mail.  the
"argument" i pass is in the form of an MHSHOW environment variable:

1) ptext -- always shows me the text/plain part, by blocking out mh's
    knowledge of how to display html:

    MHSHOW=$Mail/mhn.block_html \
        mhshow -type text/plain "$@" | hilite | less

    the file mhn.block_html looks like this -- a single line, nothing after the
    colon delimiter:
    $ cat mhn.block_html

2) phtml_dump -- converts html to flat text via elinks.  i use this
        if all i need to is read the content.

    MHSHOW=$Mail/mhn.html_dump \
        mhshow -noconcat -type text/html "$@" | hilite | less

    the file mhn.html_dump looks like this:
    $ cat mhn.html_dump
    mhshow-show-text/html: %p/usr/bin/elinks -force-html '%F' -dump

3) phtml_viewer -- shows html in a live text browser.  sometimes
    i want to interact (albeit primitively) with the content, like
    when someone sends me commercial mail with an "unsubscribe" link
    buried in it somewhere.  i find a text browser perfectly adequate
    for that.

    MHSHOW=$Mail/mhn.html_live \
        mhshow -noconcat -type text/html "$@"

    $ cat mhn.html_live
    mhshow-show-text/html: %p/usr/bin/links -force-html '%F'

i forget why i use links in case 3) and elinks in 2) -- i experimented
to figure out which of the many text browsers i liked best for each

finally, i also have a script (which i intend to share with the list
someday soon) for dealing with mime parts.  i can quickly and easily
select a part (the text/html part, say), save it to a file in /tmp,
and then switch to my "real" firefox or chrome browser and type
file:///tmp/message.html into the URL bar to bring up the message.

 paul fox, address@hidden (arlington, ma, where it's 53.8 degrees)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]