Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] How to deal with HTML attachments?
@ 2011-05-11 13:53 Steve
  2011-05-11 14:13 ` Mark Alexander
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Steve @ 2011-05-11 13:53 UTC (permalink / raw)
  To: sup-devel

Hi,

A couple days ago, a significant portion of my incoming mail is
arriving as an HTML attachment only, where previously, HTML formatted
emails showed up as semi-readable text and also as an attachment.  I
have not messed with sup recently.

How do you recommend dealing with HTML attachments?  I hit <enter> on
the attachment and it says "Couldn't execute view command, viewing as
text."  Any way to bring this up in a web browser?

Thanks.
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] How to deal with HTML attachments?
  2011-05-11 13:53 [sup-devel] How to deal with HTML attachments? Steve
@ 2011-05-11 14:13 ` Mark Alexander
  2011-05-11 14:59   ` Steve
  2011-05-11 14:15 ` Patrick Totzke
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Mark Alexander @ 2011-05-11 14:13 UTC (permalink / raw)
  To: Steve; +Cc: sup-devel

Excerpts from Steve's message of Wed May 11 09:53:27 -0400 2011:
> How do you recommend dealing with HTML attachments?

I use a text-mode browser called w3m to view HTML.  Sup will invoke it
as necessary (on Ubuntu, at least) if you put the following in your
~/.mailcap file:

text/html; /usr/bin/w3m -o confirm_qq=false -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] How to deal with HTML attachments?
  2011-05-11 13:53 [sup-devel] How to deal with HTML attachments? Steve
  2011-05-11 14:13 ` Mark Alexander
@ 2011-05-11 14:15 ` Patrick Totzke
  2011-05-11 15:40   ` Steve
  2011-05-11 14:30 ` Matías Aguirre
  2011-05-12  8:30 ` Tero Tilus
  3 siblings, 1 reply; 11+ messages in thread
From: Patrick Totzke @ 2011-05-11 14:15 UTC (permalink / raw)
  To: sup-devel


[-- Attachment #1.1: Type: text/plain, Size: 841 bytes --]

Hi,
I use a mime-hook like this for inline html:
in ~/.sup/hooks$ cat mime-decode.rb :

 case content_type
 when "text/html"
   `/usr/bin/lynx -dump '#{filename}'`
 end

To view html when hitting enter you could set your browser in ~/.mailcap:

 text/html; firefox %s

best,
/p

Excerpts from Steve's message of Wed May 11 14:53:27 +0100 2011:
> Hi,
> 
> A couple days ago, a significant portion of my incoming mail is
> arriving as an HTML attachment only, where previously, HTML formatted
> emails showed up as semi-readable text and also as an attachment.  I
> have not messed with sup recently.
> 
> How do you recommend dealing with HTML attachments?  I hit <enter> on
> the attachment and it says "Couldn't execute view command, viewing as
> text."  Any way to bring this up in a web browser?
> 
> Thanks.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] How to deal with HTML attachments?
  2011-05-11 13:53 [sup-devel] How to deal with HTML attachments? Steve
  2011-05-11 14:13 ` Mark Alexander
  2011-05-11 14:15 ` Patrick Totzke
@ 2011-05-11 14:30 ` Matías Aguirre
  2011-05-12  8:30 ` Tero Tilus
  3 siblings, 0 replies; 11+ messages in thread
From: Matías Aguirre @ 2011-05-11 14:30 UTC (permalink / raw)
  To: sup-devel

Excerpts from Steve's message of Wed May 11 10:53:27 -0300 2011:
> Hi,
> 
> A couple days ago, a significant portion of my incoming mail is
> arriving as an HTML attachment only, where previously, HTML formatted
> emails showed up as semi-readable text and also as an attachment.  I
> have not messed with sup recently.
> 
> How do you recommend dealing with HTML attachments?  I hit <enter> on
> the attachment and it says "Couldn't execute view command, viewing as
> text."  Any way to bring this up in a web browser?

Add this to your ~/.mailcap

text/html; /path/to/browser '%s'; description=HTML Text; nametemplate=%s.html

> Thanks.
-- 
Matías Aguirre <matiasaguirre@gmail.com>
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] How to deal with HTML attachments?
  2011-05-11 14:13 ` Mark Alexander
@ 2011-05-11 14:59   ` Steve
  2011-05-11 15:24     ` Mark Alexander
  0 siblings, 1 reply; 11+ messages in thread
From: Steve @ 2011-05-11 14:59 UTC (permalink / raw)
  To: Mark Alexander; +Cc: sup-devel

On Wed, May 11, 2011 at 10:13 AM, Mark Alexander <marka@pobox.com> wrote:
> Excerpts from Steve's message of Wed May 11 09:53:27 -0400 2011:
>> How do you recommend dealing with HTML attachments?
>
> I use a text-mode browser called w3m to view HTML.  Sup will invoke it
> as necessary (on Ubuntu, at least) if you put the following in your
> ~/.mailcap file:
>
> text/html; /usr/bin/w3m -o confirm_qq=false -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html
>

Thanks for the tip!

However, it's still telling me it can't execute the command.

Prior to this, I had no .mailcap.  I created one and restarted sup.
Do I need to somehow tell sup about this?

Thanks.
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] How to deal with HTML attachments?
  2011-05-11 14:59   ` Steve
@ 2011-05-11 15:24     ` Mark Alexander
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Alexander @ 2011-05-11 15:24 UTC (permalink / raw)
  To: Steve; +Cc: sup-devel

Excerpts from Steve's message of Wed May 11 10:59:09 -0400 2011:
> However, it's still telling me it can't execute the command.

You may need to install w3m and possibly run-mailcap (part of the mime-support
package on Ubuntu).
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] How to deal with HTML attachments?
  2011-05-11 14:15 ` Patrick Totzke
@ 2011-05-11 15:40   ` Steve
  0 siblings, 0 replies; 11+ messages in thread
From: Steve @ 2011-05-11 15:40 UTC (permalink / raw)
  To: Sup developer discussion

On Wed, May 11, 2011 at 10:15 AM, Patrick Totzke
<patricktotzke@googlemail.com> wrote:
> Hi,
> I use a mime-hook like this for inline html:
> in ~/.sup/hooks$ cat mime-decode.rb :
>
>  case content_type
>  when "text/html"
>   `/usr/bin/lynx -dump '#{filename}'`
>  end
>
> To view html when hitting enter you could set your browser in ~/.mailcap:
>
>  text/html; firefox %s
>
> best,
> /p


The mime-decode.rb hook does the trick.

Still can't get sup to invoke w3m when I hit <enter> on HTML
attachments.  W3m is installed.  Something isn't hooked up correctly.
But oh well, we'll save that for the next guy.

Thanks, all.
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] How to deal with HTML attachments?
  2011-05-11 13:53 [sup-devel] How to deal with HTML attachments? Steve
                   ` (2 preceding siblings ...)
  2011-05-11 14:30 ` Matías Aguirre
@ 2011-05-12  8:30 ` Tero Tilus
  2011-05-12 13:21   ` Mark Alexander
  3 siblings, 1 reply; 11+ messages in thread
From: Tero Tilus @ 2011-05-12  8:30 UTC (permalink / raw)
  To: Sup developers

Steve, 2011-05-11 16:53:
> How do you recommend dealing with HTML attachments?

Primary options were already introduced by others.

I use publish hook to view attachments (and html-messages) in browser.
Just hit P and click the link.

I run sup screened in a vps box, so mailcapping html to browser is not
an option for me.  My publish.rb looks like this

http://pastie.org/private/ki9luv8yfqjknbhheomi1g

Feel free to use.

-- 
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] How to deal with HTML attachments?
  2011-05-12  8:30 ` Tero Tilus
@ 2011-05-12 13:21   ` Mark Alexander
  2011-05-13  7:39     ` Tero Tilus
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Alexander @ 2011-05-12 13:21 UTC (permalink / raw)
  To: Tero Tilus; +Cc: Sup developers

Excerpts from Tero Tilus's message of Thu May 12 04:30:39 -0400 2011:
> I run sup screened in a vps box, so mailcapping html to browser is not
> an option for me.

I also run sup in screen, sometimes from a remote system via ssh, so
that's why I chose w3m as the mailcap'd browser.
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] How to deal with HTML attachments?
  2011-05-12 13:21   ` Mark Alexander
@ 2011-05-13  7:39     ` Tero Tilus
  2011-05-13  9:55       ` Patrick Totzke
  0 siblings, 1 reply; 11+ messages in thread
From: Tero Tilus @ 2011-05-13  7:39 UTC (permalink / raw)
  To: Sup developers

Mark Alexander, 2011-05-12 16:21:
> I also run sup in screen, sometimes from a remote system via ssh, so
> that's why I chose w3m as the mailcap'd browser.

I do w3m too.  Most (~90%) of the time it does exactly what I want,
but sometimes (say with images, pdf:s and strangely laid out html
documents) an url to the document is a must.

-- 
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] How to deal with HTML attachments?
  2011-05-13  7:39     ` Tero Tilus
@ 2011-05-13  9:55       ` Patrick Totzke
  0 siblings, 0 replies; 11+ messages in thread
From: Patrick Totzke @ 2011-05-13  9:55 UTC (permalink / raw)
  To: sup-devel


[-- Attachment #1.1: Type: text/plain, Size: 653 bytes --]

Excerpts from Tero Tilus's message of Fri May 13 08:39:34 +0100 2011:
> Mark Alexander, 2011-05-12 16:21:
> > I also run sup in screen, sometimes from a remote system via ssh, so
> > that's why I chose w3m as the mailcap'd browser.
> 
> I do w3m too.  Most (~90%) of the time it does exactly what I want,
> but sometimes (say with images, pdf:s and strangely laid out html
> documents) an url to the document is a must.

I can highly recommend lynx'x dump mode for inline html: it 
produces a "references" suffix which displays all URI's from the
links in the document. This works great con combination with 
urxvt's url-select script.
/p

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-05-13  9:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-11 13:53 [sup-devel] How to deal with HTML attachments? Steve
2011-05-11 14:13 ` Mark Alexander
2011-05-11 14:59   ` Steve
2011-05-11 15:24     ` Mark Alexander
2011-05-11 14:15 ` Patrick Totzke
2011-05-11 15:40   ` Steve
2011-05-11 14:30 ` Matías Aguirre
2011-05-12  8:30 ` Tero Tilus
2011-05-12 13:21   ` Mark Alexander
2011-05-13  7:39     ` Tero Tilus
2011-05-13  9:55       ` Patrick Totzke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox