Gnus development mailing list
 help / color / mirror / Atom feed
* WIBNI
@ 1999-07-14  9:52 Lee Willis
  1999-07-14 13:16 ` WIBNI Doug Bagley
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Lee Willis @ 1999-07-14  9:52 UTC (permalink / raw)


Just a thought here ...

Wouldn't it be nice if we could specify filters for certain MIME types.
What I was specifically thinking of was this:

When someone sends me a message with a MS Word Document as an
attachment, I'd like to able to specify that attachments of that type
(application/ms-word??) get passed to "mswordview %s -o -" which outputs
HTML on it's standard out, which then gets inserted into the article
buffer and treated as text/html.

ie I'd need to configure the four values

MIME type            Filter       Args   Output type
"application/msword" "mswordview" "-o -" "text/html"

And he presto I get W3 rendering a copy of the word document as HTML in
the article buffer.

You could also do similar things to convert all images to something your
Xemacs could handle etc. etc.  The list goes on. Not sure how you'd do
this or how it would apply to multipart/alternatives. Plus I think you'd
also have to able to do it based on attachment file name since word
documents commonly come as application/octet-stream.

Just a thought ... Anyone else find this useful?

Lee.
PS. nnslashdot sounds cool :)
-- 
I was doing object-oriented assembly at 1 year old ...  
For some reason my mom insists on calling it "Playing with blocks"


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

* Re: WIBNI
  1999-07-14  9:52 WIBNI Lee Willis
@ 1999-07-14 13:16 ` Doug Bagley
  1999-07-14 13:35 ` WIBNI wmperry
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Doug Bagley @ 1999-07-14 13:16 UTC (permalink / raw)


Lee Willis <lee@gbdirect.co.uk> writes:
> When someone sends me a message with a MS Word Document as an
> attachment, I'd like to able to specify that attachments of that type
> (application/ms-word??) get passed to "mswordview %s -o -" which outputs
> HTML on it's standard out, which then gets inserted into the article
> buffer and treated as text/html.
[...]
> Just a thought ... Anyone else find this useful?

Very much so.  I get the occasional ms-word document attachment, and a 
replacement for my current manual conversion process would be great.

Cheers,
Doug


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

* Re: WIBNI
  1999-07-14  9:52 WIBNI Lee Willis
  1999-07-14 13:16 ` WIBNI Doug Bagley
@ 1999-07-14 13:35 ` wmperry
  1999-08-27 18:19 ` WIBNI Lars Magne Ingebrigtsen
  1999-08-27 18:21 ` WIBNI Lars Magne Ingebrigtsen
  3 siblings, 0 replies; 11+ messages in thread
From: wmperry @ 1999-07-14 13:35 UTC (permalink / raw)
  Cc: ding

Lee Willis <lee@gbdirect.co.uk> writes:

> Just a thought here ...
> 
> Wouldn't it be nice if we could specify filters for certain MIME types.
> What I was specifically thinking of was this:
> 
> When someone sends me a message with a MS Word Document as an
> attachment, I'd like to able to specify that attachments of that type
> (application/ms-word??) get passed to "mswordview %s -o -" which outputs
> HTML on it's standard out, which then gets inserted into the article
> buffer and treated as text/html.
> 
> ie I'd need to configure the four values
> 
> MIME type            Filter       Args   Output type
> "application/msword" "mswordview" "-o -" "text/html"
> 
> And he presto I get W3 rendering a copy of the word document as HTML in
> the article buffer.
> 
> You could also do similar things to convert all images to something your
> Xemacs could handle etc. etc.

Just an FYI - the 'images.el' file distributed with Emacs/W3 does this
right now.  Basically it defines filters from one image type to another
until it finds one your Emacs can handle.

You can add arbitrary image converters using:

-------------------------------------------------------------------------------
`image-register-converter' is a Lisp function
  -- loaded from "/usr/people/wmperry/lisp/development/w3/lisp/images.el"
(image-register-converter FROM TO CONVERTER)

Documentation:
Register the image converter for FROM to TO.  CONVERTER is the actual
command used to convert the image.  If this is a string, it will be executed
in a subprocess.  If a symbol, it is assumed to be a function.  It will be
called with two arguments, the start and end of the data to be converted.
The function should replace that data with the new image data.  The return
value is not significant.
-------------------------------------------------------------------------------

It takes some pains to find the shortest path from one image format to
another.

You then just call image-normalize

-------------------------------------------------------------------------------
`image-normalize' is a Lisp function
  -- loaded from "/usr/people/wmperry/lisp/development/w3/lisp/images.el"
(image-normalize FORMAT DATA)

Documentation:
Return an image specification for XEmacs 19.13 and later.  FORMAT specifies
the image format, DATA is the image data as a string.  Any conversions to get
to a suitable internal image format will be carried out.
-------------------------------------------------------------------------------

The only things I have default image converters for are using the netpbm
image utilities.  So something like:

(image-converter-chain 'ppm 'gif)
=> ("(ppmquant 256 | ppmtogif)")

(image-converter-chain 'ppm 'xpm)
=> ("ppmtoxpm")

image-normalize is a no-op if you can natively understand the image
format.  This only works in XEmacs right now, but I'm going to try and get
the new Emacs redisplay image stuff in there at some point.

-Bill P.


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

* Re: WIBNI
  1999-07-14  9:52 WIBNI Lee Willis
  1999-07-14 13:16 ` WIBNI Doug Bagley
  1999-07-14 13:35 ` WIBNI wmperry
@ 1999-08-27 18:19 ` Lars Magne Ingebrigtsen
  1999-08-27 19:05   ` WIBNI William M. Perry
  1999-08-27 18:21 ` WIBNI Lars Magne Ingebrigtsen
  3 siblings, 1 reply; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-08-27 18:19 UTC (permalink / raw)


Lee Willis <lee@gbdirect.co.uk> writes:

> ie I'd need to configure the four values
> 
> MIME type            Filter       Args   Output type
> "application/msword" "mswordview" "-o -" "text/html"
> 
> And he presto I get W3 rendering a copy of the word document as HTML in
> the article buffer.

William has described the chain for converting images, but I don't
think a similar chain can exist for, er, documents.  I mean, you can
convert most any picture to most any other picture format, but you
can't reasonably go from Frame to msword to postscript to html to
LaTeX, or whatever.

So I think it would make more sense just to define a viewer for
application/msword that converts to html and then hands it to w3.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: WIBNI
  1999-07-14  9:52 WIBNI Lee Willis
                   ` (2 preceding siblings ...)
  1999-08-27 18:19 ` WIBNI Lars Magne Ingebrigtsen
@ 1999-08-27 18:21 ` Lars Magne Ingebrigtsen
  3 siblings, 0 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-08-27 18:21 UTC (permalink / raw)


Lee Willis <lee@gbdirect.co.uk> writes:

> Just a thought ... Anyone else find this useful?

... on the other hand...  It does sound kinda kool.  Hm.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: WIBNI
  1999-08-27 18:19 ` WIBNI Lars Magne Ingebrigtsen
@ 1999-08-27 19:05   ` William M. Perry
  1999-08-27 19:19     ` WIBNI Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: William M. Perry @ 1999-08-27 19:05 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Lee Willis <lee@gbdirect.co.uk> writes:
> 
> > ie I'd need to configure the four values
> > 
> > MIME type            Filter       Args   Output type
> > "application/msword" "mswordview" "-o -" "text/html"
> > 
> > And he presto I get W3 rendering a copy of the word document as HTML in
> > the article buffer.
> 
> William has described the chain for converting images, but I don't think
> a similar chain can exist for, er, documents.  I mean, you can convert
> most any picture to most any other picture format, but you can't
> reasonably go from Frame to msword to postscript to html to LaTeX, or
> whatever.

Reason?  We don't need no stinking reason!  This is emacs after all, who
needs to be reasonable? :)

> So I think it would make more sense just to define a viewer for
> application/msword that converts to html and then hands it to w3.

Probably right, but...

Would be cool to have generic mime-type converting though.  You could
extend the logic in images.el to arbitrary MIME types pretty easily though.
You might want to add a 'quality' parameter though, so that we don't just
blindly choose the shortest chain but at a lower total quality output.
Hmmm....

-Bill P.


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

* Re: WIBNI
  1999-08-27 19:05   ` WIBNI William M. Perry
@ 1999-08-27 19:19     ` Lars Magne Ingebrigtsen
  1999-08-27 19:56       ` WIBNI William M. Perry
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-08-27 19:19 UTC (permalink / raw)


wmperry@aventail.com (William M. Perry) writes:

> Reason?  We don't need no stinking reason!  This is emacs after all, who
> needs to be reasonable? :)

:-)

> Would be cool to have generic mime-type converting though.  You could
> extend the logic in images.el to arbitrary MIME types pretty easily though.
> You might want to add a 'quality' parameter though, so that we don't just
> blindly choose the shortest chain but at a lower total quality output.

If tools existed for documents comparable to the netpbm collection,
then it would be very interesting.  Say -- something that converted
from "any" document format to (*ick*) RTF, and then from RTF to "any"
other document format.

If all we have is mswordview, then it would still be fun, but less
useful to create a generic framework for this stuff.

On the other hand...  We're not just talking documents and images
here.  Convertion of sound from format to format?  Video?  Hm.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: WIBNI
  1999-08-27 19:19     ` WIBNI Lars Magne Ingebrigtsen
@ 1999-08-27 19:56       ` William M. Perry
  1999-08-30 12:41         ` WIBNI Robert Bihlmeyer
  0 siblings, 1 reply; 11+ messages in thread
From: William M. Perry @ 1999-08-27 19:56 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> wmperry@aventail.com (William M. Perry) writes:
> 
> > Would be cool to have generic mime-type converting though.  You could
> > extend the logic in images.el to arbitrary MIME types pretty easily though.
> > You might want to add a 'quality' parameter though, so that we don't just
> > blindly choose the shortest chain but at a lower total quality output.
> 
> If tools existed for documents comparable to the netpbm collection, then
> it would be very interesting.  Say -- something that converted from "any"
> document format to (*ick*) RTF, and then from RTF to "any" other document
> format.
> 
> If all we have is mswordview, then it would still be fun, but less useful
> to create a generic framework for this stuff.
> 
> On the other hand...  We're not just talking documents and images here.
> Convertion of sound from format to format?  Video?  Hm.

SOX rocks!  It could take care of the sound->sound stuff.  I don't know of
any video converters though.

-Bill P.


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

* Re: WIBNI
  1999-08-27 19:56       ` WIBNI William M. Perry
@ 1999-08-30 12:41         ` Robert Bihlmeyer
  0 siblings, 0 replies; 11+ messages in thread
From: Robert Bihlmeyer @ 1999-08-30 12:41 UTC (permalink / raw)


Hi,

>>>>> On 27 Aug 1999 14:56:19 -0500
>>>>> wmperry@aventail.com (William M. Perry) said:

 Bill> SOX rocks! It could take care of the sound->sound stuff.

Indeed.

 Bill> I don't know of any video converters though.

If you take "a series of pnm images" as the base format, you can
probably hack together converters from most popular video formats to
this format. The reverse path is not always as easy, though.

        Robbe

-- 
Robert Bihlmeyer	reads: Deutsch, English, MIME, Latin-1, NO SPAM!
<robbe@orcus.priv.at>	<http://stud2.tuwien.ac.at/~e9426626/sig.html>


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

* Re: WIBNI
  1999-10-11 15:37 WIBNI Lee Willis
@ 1999-11-06 21:51 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-11-06 21:51 UTC (permalink / raw)


Lee Willis <lee@gbdirect.co.uk> writes:

> Fine and dandy except I have some groups where I'd like it to expire
> everything except the most recent x number of messages. That way I
> limit the mailboxes size regardless of how busy the list has been,
> more for my convenience than any disk usage concerns but it's be a
> nice thought.

Hm.  Uhm.  No, I don't think that would be generally useful.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen


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

* WIBNI
@ 1999-10-11 15:37 Lee Willis
  1999-11-06 21:51 ` WIBNI Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Lee Willis @ 1999-10-11 15:37 UTC (permalink / raw)


Oops, here we go again. I currently have the following group-parameters
in several of my groups ...

((expiry-wait . 2))

Which works wondefully in the sense that everything over two days old
gets expired. Fine and dandy except I have some groups where I'd like it
to expire everything except the most recent x number of messages. That
way I limit the mailboxes size regardless of how busy the list has been,
more for my convenience than any disk usage concerns but it's be a nice
thought.

Perhaps

((expiry-max . 50)) or ((expiry-wait . "#50"))  ??

Thoughts?

Lee.
-- 
I was doing object-oriented assembly at 1 year old ...  
For some reason my mom insists on calling it "Playing with blocks"


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

end of thread, other threads:[~1999-11-06 21:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-14  9:52 WIBNI Lee Willis
1999-07-14 13:16 ` WIBNI Doug Bagley
1999-07-14 13:35 ` WIBNI wmperry
1999-08-27 18:19 ` WIBNI Lars Magne Ingebrigtsen
1999-08-27 19:05   ` WIBNI William M. Perry
1999-08-27 19:19     ` WIBNI Lars Magne Ingebrigtsen
1999-08-27 19:56       ` WIBNI William M. Perry
1999-08-30 12:41         ` WIBNI Robert Bihlmeyer
1999-08-27 18:21 ` WIBNI Lars Magne Ingebrigtsen
1999-10-11 15:37 WIBNI Lee Willis
1999-11-06 21:51 ` WIBNI Lars Magne Ingebrigtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).