Gnus development mailing list
 help / color / mirror / Atom feed
* piping html inline images through filter
@ 2015-10-13 20:16 Peter Münster
  2015-10-14 11:47 ` Enrico Schumann
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Münster @ 2015-10-13 20:16 UTC (permalink / raw)
  To: ding

Hi,

How would it be possible to pipe html inline images through a filter
program please?

Use case: some people often send me messages with inline images that are
screenshots (GIF images with mostly text). When replying, I would like
to quote the text of the images.

Idea:
- display article in html mode
- call a washing function, that pipes all images through a filter
  (OCR program, that converts images to text)
- then reply to the message and have all inline images quoted as text

How could I make such a washing function please? Or do you have better
ideas?

TIA for any help,
-- 
           Peter




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

* Re: piping html inline images through filter
  2015-10-13 20:16 piping html inline images through filter Peter Münster
@ 2015-10-14 11:47 ` Enrico Schumann
  2015-10-14 17:42   ` Peter Münster
  0 siblings, 1 reply; 4+ messages in thread
From: Enrico Schumann @ 2015-10-14 11:47 UTC (permalink / raw)
  To: Peter Münster; +Cc: ding

On Tue, 13 Oct 2015, Peter Münster <pmlists@free.fr> writes:

> Hi,
>
> How would it be possible to pipe html inline images through a filter
> program please?
>
> Use case: some people often send me messages with inline images that are
> screenshots (GIF images with mostly text). When replying, I would like
> to quote the text of the images.
>
> Idea:
> - display article in html mode
> - call a washing function, that pipes all images through a filter
>   (OCR program, that converts images to text)
> - then reply to the message and have all inline images quoted as text
>
> How could I make such a washing function please? Or do you have better
> ideas?
>
> TIA for any help,

For processing specific parts of the email you could first save the
interesting parts to some tmp-directory (for instance with
'gnus-summary-save-parts'). Then run a 'shell-command' that does all the
computations on the image(s), the output of which you insert into your
reply.

-- 
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net



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

* Re: piping html inline images through filter
  2015-10-14 11:47 ` Enrico Schumann
@ 2015-10-14 17:42   ` Peter Münster
  2015-10-15 14:26     ` Enrico Schumann
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Münster @ 2015-10-14 17:42 UTC (permalink / raw)
  To: ding

On Wed, Oct 14 2015, Enrico Schumann wrote:

> For processing specific parts of the email you could first save the
> interesting parts to some tmp-directory (for instance with
> 'gnus-summary-save-parts'). Then run a 'shell-command' that does all the
> computations on the image(s), the output of which you insert into your
> reply.

Yes, thanks. And how would it be possible to place the output at the
right location please?

TIA,
-- 
           Peter




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

* Re: piping html inline images through filter
  2015-10-14 17:42   ` Peter Münster
@ 2015-10-15 14:26     ` Enrico Schumann
  0 siblings, 0 replies; 4+ messages in thread
From: Enrico Schumann @ 2015-10-15 14:26 UTC (permalink / raw)
  To: Peter Münster; +Cc: ding

On Wed, 14 Oct 2015, Peter Münster <pmlists@free.fr> writes:

> On Wed, Oct 14 2015, Enrico Schumann wrote:
>
>> For processing specific parts of the email you could first save the
>> interesting parts to some tmp-directory (for instance with
>> 'gnus-summary-save-parts'). Then run a 'shell-command' that does all the
>> computations on the image(s), the output of which you insert into your
>> reply.
>
> Yes, thanks. And how would it be possible to place the output at the
> right location please?
>
> TIA,

I have no idea; sorry. [In my workflow, the script sends the emails,
without any interaction.]

In principle, you could to something like this from the Summary buffer

  (defun reply-with-shell-output () 
    (interactive)
    ;; save parts with gnus-summary-save-parts
    (gnus-summary-reply-with-original 1)
    ;; move to correct place
    (shell-command "date" t))

but it would require quite some manoeuvring/editing in the reply-buffer.

-- 
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net



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

end of thread, other threads:[~2015-10-15 14:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-13 20:16 piping html inline images through filter Peter Münster
2015-10-14 11:47 ` Enrico Schumann
2015-10-14 17:42   ` Peter Münster
2015-10-15 14:26     ` Enrico Schumann

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).