nmh-workers
[Top] [All Lists]

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

2014-05-14 10:18:04
norm(_at_)dad(_dot_)org 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
        mhshow-show-text/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
task.

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
=----------------------
 paul fox, pgf(_at_)foxharp(_dot_)boston(_dot_)ma(_dot_)us (arlington, ma, 
where it's 53.8 degrees)

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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