🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #56088

Re: slrn: how to view image

#56088
From: John E. Davis
Date: Wed, 29 Dec 1999 00:00
63 lines
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

Technical Details
Message-ID: <slrn86l224.ik.davis@aluche.mit.edu>
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
References: <slrn86cssg.p7f.k.w.wibowo@isnet-2.isnet.org>

Show Full Headers
Complete Article Headers
Message-ID: <slrn86l224.ik.davis@aluche.mit.edu>
Subject: Re: slrn: how to view image
Date: Wed, 29 Dec 1999 00:00:00 +0000
From: davis@space.mit.edu (John E. Davis)
References: <slrn86cssg.p7f.k.w.wibowo@isnet-2.isnet.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-mail
X-Deja-AN: 566273215
X-Complaints-To: usenet@micro-heart-of-gold.mit.edu
X-Trace: micro-heart-of-gold.mit.edu 946505798 41655 18.75.2.45 (29 Dec 1999 22:16:38 GMT)
Organization: Center for Space Research
User-Agent: slrn/0.9.6.2 (Linux)
Reply-To: davis@space.mit.edu
NNTP-Posting-Date: 29 Dec 1999 22:16:38 GMT
Newsgroups: news.software.readers