Article View: news.software.readers
Article #59785Re: SLRN Capital L
From: Ralf Arens
Date: Wed, 29 Mar 2000 00:00
Date: Wed, 29 Mar 2000 00:00
73 lines
2593 bytes
2593 bytes
kristian ragndahl <ragndahl@postmaster.co.uk> wrote:
[...]
> Sorry for the intrusion, but since you've put a
> x-face in your headers, is there any way of
> (automatically) displaying them in slrn?
You can't display them inline. You can use an external program like
this:
,----[ xface_view ]
| #!/usr/bin/perl -w
|
| # xface_view
| # by Ralf Arens
|
| # reads a mail or a posting from STDIN
| # removes everything but xface data
| # uses external programs to decode and view the picture
|
| $found = 0;
| while (defined($line = <STDIN>)) {
| next unless ($line =~ /^X-[Ff]ace: /);
| $found = 1;
| push(@face, $line);
| while ($line = <STDIN>) {
| last if ($line =~ /^$/); # last line of header
| if ($line =~ /^ .*$/) {
| push(@face, $line);
| } else {
| last; # no more X-Face lines
| }
| }
| last;
| }
|
| if ($found == 0) {exit;}
|
| $face[0] =~ s/^X-[Ff]ace: (.+)$/$1/;
| $tmp = `mktemp -q /tmp/xface.XXXXXX`;
| chomp $tmp;
| open (FACE, "| uncompface | ikon2xbm > ".$tmp);
| print FACE @face;
| close FACE;
| system("xv ".$tmp);
| unlink $tmp;
`----
Maybe you want to change the "system" statement in the last but one
line (another picture viewer or an additional "&").
You need the external programs "uncompface" and "ikon2xbm" (for Red
Hat they are in faces-xface-???.rpm).
I use "X" to call it from slrn:
,----[ .slrn.sl ]
| define pipe_to_xface_view ()
| {
| pipe_article ("xface_view");
| }
| definekey ("pipe_to_xface_view", "X", "article");
`----
Ciao,
Ralf
--
In God we trust, all others we polygraph.
-- A CIA-spook in "The Cuckoo's Egg" by Cliff Stoll.
Technical Details
Message-ID:
<01erb8.871.ln@ralf.dyndns.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn8dru4f.1fu.ajlewis2@sidekick.com> <slrn8dsj5c.d5.efflandt@efflandt.xnet.com> <slrn8dsllf.nk.ajlewis2@sidekick.com> <slrn8dt1tg.g53.dave@svarozic.srce.hr> <86d7ohw8in.fsf@ragndahl.cx>Show Full Headers
Complete Article Headers
Message-ID: <01erb8.871.ln@ralf.dyndns.org> Subject: Re: SLRN Capital L Date: Wed, 29 Mar 2000 00:00:00 +0000 From: ralf.arens@tu-clausthal.de (Ralf Arens) References: <slrn8dru4f.1fu.ajlewis2@sidekick.com> <slrn8dsj5c.d5.efflandt@efflandt.xnet.com> <slrn8dsllf.nk.ajlewis2@sidekick.com> <slrn8dt1tg.g53.dave@svarozic.srce.hr> <86d7ohw8in.fsf@ragndahl.cx> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 603647240 Organization: Rechenzentrum der TU Clausthal User-Agent: slrn/0.9.6.2 (Linux) Newsgroups: news.software.readers