* [sup-talk] new in svn: mime-type hook
@ 2007-08-29 4:15 William Morgan
2007-08-31 19:02 ` jeff covey
0 siblings, 1 reply; 5+ messages in thread
From: William Morgan @ 2007-08-29 4:15 UTC (permalink / raw)
There's a new hook for all your MIME decoding needs:
mime-decode
-----------
File: ~/.sup/hooks/mime-decode.rb
Executes when decoding a MIME attachment.
Variables:
content_type: the content-type of the message
filename: the filename of the attachment as saved to disk (generated
on the fly, so don't call more than once)
sibling_types: if this attachment is part of a multipart MIME attachment,
an array of content-types for all attachments. Otherwise,
the empty array.
Return value:
The decoded text of the attachment, or nil if not decoded.
Here's what I use for mime-decode.rb. It uses w3m to translate all HTML
attachments that don't have a text/html alternative:
unless sibling_types.member? "text/plain"
case content_type
when "text/html"
`/usr/bin/w3m -dump -T #{content_type} '#{filename}'`
end
end
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] new in svn: mime-type hook
2007-08-29 4:15 [sup-talk] new in svn: mime-type hook William Morgan
@ 2007-08-31 19:02 ` jeff covey
2007-08-31 19:36 ` Magnus Therning
2007-09-01 6:28 ` William Morgan
0 siblings, 2 replies; 5+ messages in thread
From: jeff covey @ 2007-08-31 19:02 UTC (permalink / raw)
Excerpts from William Morgan's message of Wed Aug 29 00:15:23 -0400 2007:
> File: ~/.sup/hooks/mime-decode.rb
it's working for me, thanks! a lot of messages are finally showing
something other than a single "attachment" line. :)
in the process of making this, did something go wrong with sup's decoding of
ordinary messages? i'm seeing a lot of messages with equals marks at the
ends of lines, like:
> This e-mail notifies you that the Bureau of the Public Debt just issued=
> a press
> release concerning the securities identified in the subject area of thi=
> s
> message. =A0Clicking on the address listed above after "Press Release" =
> should take
> you to Public Debt's Internet page of a PDF version of the actual press=
here's a copy of the original message from which this was taken:
http://jeffcovey.net/tmp/.sup-equals.txt
this was happening before and after i created my ~/.sup/hooks/mime-decode.rb
file.
thanks,
--
jeff covey
http://jeffcovey.net/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] new in svn: mime-type hook
2007-08-31 19:02 ` jeff covey
@ 2007-08-31 19:36 ` Magnus Therning
2007-09-01 6:28 ` William Morgan
1 sibling, 0 replies; 5+ messages in thread
From: Magnus Therning @ 2007-08-31 19:36 UTC (permalink / raw)
On Fri, Aug 31, 2007 at 15:02:44 -0400, jeff covey wrote:
[..]
>
>in the process of making this, did something go wrong with sup's
>decoding of ordinary messages? i'm seeing a lot of messages with
>equals marks at the ends of lines, like:
>
>> This e-mail notifies you that the Bureau of the Public Debt just issued=
>> a press
>> release concerning the securities identified in the subject area of thi=
>> s
>> message. =A0Clicking on the address listed above after "Press Release" =
>> should take
>> you to Public Debt's Internet page of a PDF version of the actual press=
>
>here's a copy of the original message from which this was taken:
>
>http://jeffcovey.net/tmp/.sup-equals.txt
>
>this was happening before and after i created my
>~/.sup/hooks/mime-decode.rb file.
That looks like something relating to quoted-printable. IIRC the equal
sign is an escape for the newline character.
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus?therning?org Jabber: magnus?therning?gmail?com
http://therning.org/magnus
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.
-- R.P. Feynman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070831/c6b50649/attachment.bin
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] new in svn: mime-type hook
2007-08-31 19:02 ` jeff covey
2007-08-31 19:36 ` Magnus Therning
@ 2007-09-01 6:28 ` William Morgan
2007-09-02 11:31 ` jeff covey
1 sibling, 1 reply; 5+ messages in thread
From: William Morgan @ 2007-09-01 6:28 UTC (permalink / raw)
Excerpts from jeff.covey's message of Fri Aug 31 12:02:44 -0700 2007:
> in the process of making this, did something go wrong with sup's
> decoding of ordinary messages? i'm seeing a lot of messages with
> equals marks at the ends of lines, like:
Whoops, yes. SVN up and see if that fixes it.
--
_____________________________________________________________________________
| |
| | \ | / | |
| |\ \|/ /| |
| |XXXXX||>>>>>>>>>>>>>>>>>>>>>>> ((*)) <<<<<<<<<<<<<<<<<<<<<<<||XXXXX| |
| |/ /|\ \| |
| | / | \ | |
| |
| Death Star |
| War Lord of the Sup wmorgan-sup at masanjin.net |
|___________________________________________________________________________|
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] new in svn: mime-type hook
2007-09-01 6:28 ` William Morgan
@ 2007-09-02 11:31 ` jeff covey
0 siblings, 0 replies; 5+ messages in thread
From: jeff covey @ 2007-09-02 11:31 UTC (permalink / raw)
Excerpts from William Morgan's message of Sat Sep 01 02:28:55 -0400 2007:
> > in the process of making this, did something go wrong with sup's
> > decoding of ordinary messages? i'm seeing a lot of messages with equals
> > marks at the ends of lines
>
> Whoops, yes. SVN up and see if that fixes it.
yes, seems to be fine now.
thanks,
--
jeff covey
http://jeffcovey.net/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-09-02 11:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-29 4:15 [sup-talk] new in svn: mime-type hook William Morgan
2007-08-31 19:02 ` jeff covey
2007-08-31 19:36 ` Magnus Therning
2007-09-01 6:28 ` William Morgan
2007-09-02 11:31 ` jeff covey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox