Thread View: news.software.readers
4 messages
4 total messages
Started by K.W.Wibowo
Sun, 26 Dec 1999 00:00
slrn: how to view image
Author: K.W.Wibowo
Date: Sun, 26 Dec 1999 00:00
Date: Sun, 26 Dec 1999 00:00
12 lines
993 bytes
993 bytes
Hi all, How do I tell slrn to decode and view image using xv directly without having to first save the article(s) and then start up xv? Thank in advance. -- cat: $HOME/.signature: No such file or directory
Re: slrn: how to view image
Author: John E. Davis
Date: Wed, 29 Dec 1999 00:00
Date: Wed, 29 Dec 1999 00:00
63 lines
2940 bytes
2940 bytes
On 26 Dec 1999 19:53:26 GMT, K.W.Wibowo <k.w.wibowo@NO-Spam_please.twi.tudelft.nl>
wrote:
>How do I tell slrn to decode and view image using xv directly without
>having to first save the article(s) and then start up xv?
I wrote the following several years ago:
From davis@space.mit.edu Tue Oct 22 19:47:10 1996
From: davis@space.mit.edu (John E. Davis)
Newsgroups: news.software.readers,alt.lang.s-lang
Subject: slrn macro for viewing images
Organization: Center for Space Research
Reply-To: davis@space.mit.edu
Followup-To:
Keywords: slrn xv
Summary: slrn macro for viewing at images
Someone asked me if was possible to create a macro that will
facilitate viewing images with slrn.
My solution will only work when slrn is run in an X Windows
environment and `xv' is available. It works in conjunction with a
shell script and slrn's standalone uudecode program.
The following macro allows a single keystroke cause the article to be
decoded and then piped to xv:
define xv_view_article ()
{
call ("art_bob");
if (re_search_article ("^begin \\d+ "))
pipe_article ("uuxv");
else
pipe_article ("uuxv -64");
}
definekey ("xv_view_article", "v", "article");
The last line binds the function `xv_view_article' to the `v' key in
article mode. The command `uuxv' is a one line shell script that
consists of simply
(uudecode --stdout $1 | xv - &) <&0
The uudecode program that is referred to is the one that ships with
slrn. That is, use `make uudecode' to build it. It might be wise to
rename it so that it is not confused with the standard unix one.
I would like to eliminate the shell script altogether and simply use
something like:
pipe_article ("uudecode --stdout $1 | xv - &");
but I was unsuccessful. If anyone manages to do this, please let me
know the trick.
--
John E. Davis Center for Space Research/AXAF Science Center
617-258-8119 One Hampshire St., Building NE80-6019
http://space.mit.edu/~davis Cambridge, MA 02139-4307
Re: slrn: how to view image
Author: Lloyd Zusman
Date: Wed, 29 Dec 1999 00:00
Date: Wed, 29 Dec 1999 00:00
45 lines
2502 bytes
2502 bytes
davis@space.mit.edu (John E. Davis) writes:
> On 26 Dec 1999 19:53:26 GMT, K.W.Wibowo <k.w.wibowo@NO-Spam_please.twi.tudelft.nl>
> wrote:
> >How do I tell slrn to decode and view image using xv directly without
> >having to first save the article(s) and then start up xv?
>
> I wrote the following several years ago:
>
> [ ... ]
>
> The last line binds the function `xv_view_article' to the `v' key in
> article mode. The command `uuxv' is a one line shell script that
> consists of simply
>
> (uudecode --stdout $1 | xv - &) <&0
I have a non-sequitur-ish question just about this one line. What is
the purpose of `<&0'? It's shorthand for `0<&0', which means
"redirect file descriptor 0 from file descriptor 0", and therefore it
seems redundant. Or is there something subtle going on here, perhaps
something to do with closing fd 0 and then reopening it?
> [ ... ]
>
> I would like to eliminate the shell script altogether and simply use
> something like:
>
> pipe_article ("uudecode --stdout $1 | xv - &");
>
> but I was unsuccessful. If anyone manages to do this, please let me
> know the trick.
It depends what "pipe_article" really does. Over the next few days
I'll look at the source code and see if I can figure it out. It might
have something to do with the way that "pipe_article" manages process
groups or SIGCHLD's or SIGPIPE's or something of that nature.
--
Lloyd Zusman
ljz@asfast.com
Re: slrn: how to view image
Author: Peter Steiner
Date: Fri, 31 Dec 1999 00:00
Date: Fri, 31 Dec 1999 00:00
31 lines
1665 bytes
1665 bytes
John E. Davis <davis@space.mit.edu> wrote:
>I would like to eliminate the shell script altogether and simply use
>something like:
>
> pipe_article ("uudecode --stdout $1 | xv - &");
>
>but I was unsuccessful.
I tried:
define xv_view_article ()
{
call ("art_bob");
if (re_search_article ("^begin \\d+ "))
pipe_article ("uudecode2 --stdout | xv - &");
else
pipe_article ("uudecode2 --stdout -64 | xv - &");
}
and it seems to work.
Peter
--
_ x ___ p.steiner@t-online.de (Peter Steiner)
/ \_/_\_ /,--' Linux User #55148 (http://counter.li.org/)
\/>'~~~~//
\_____/ perl -e'while(<>){s/=\n//g;s/=([\dA-F]{2})/chr(hex($1))/eg;print;}'
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads