Article View: news.software.readers
Article #27111slrn macro for viewing images
From: da... John E. Davis
Date: Tue, 22 Oct 1996 00:00
Date: Tue, 22 Oct 1996 00:00
45 lines
2082 bytes
2082 bytes
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 MIT 37-662c, Cambridge, MA 02139
http://space.mit.edu/~davis
Technical Details
Message-ID:
<slrn56qn7u.b04.davis@aluche.mit.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <slrn56qn7u.b04.davis@aluche.mit.edu> Subject: slrn macro for viewing images Date: Tue, 22 Oct 1996 00:00:00 +0000 From: da...@space.mit.edu (John E. Davis) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail X-Deja-AN: 191346730 Summary: slrn macro for viewing at images Organization: Center for Space Research Keywords: slrn xv Reply-to: da...@space.mit.edu Newsgroups: news.software.readers,alt.lang.s-lang