🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
3 messages
3 total messages Started by da... John E. Davis Tue, 22 Oct 1996 00:00
slrn macro for viewing images
#27111
Author: da... John E. Davis
Date: Tue, 22 Oct 1996 00:00
45 lines
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
Re: slrn macro for viewing images
#27146
Author: r... Ron Olsen
Date: Wed, 23 Oct 1996 00:00
15 lines
1026 bytes

> >Well, you've got it there already:
> >
> >   pipe_article ("(slrn-uudecode --stdout -64 | xv - &) <&0");
> 
> This does not work with my version of bash.

It works fine with the standard (11/16/88) version of ksh.

-- 
	Ron Olsen
	rono...@lucent.com
	Boulder Colorado
Re: slrn macro for viewing images
#27160
Author: da... John E. Davis
Date: Wed, 23 Oct 1996 00:00
12 lines
880 bytes

On 23 Oct 1996 09:52:18 GMT, Markolf Gudjons <eed...@eed.ericsson.se>
wrote:
>Well, you've got it there already:
>
>   pipe_article ("(slrn-uudecode --stdout -64 | xv - &) <&0");

This does not work with my version of bash.

--John
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