Article View: news.software.readers
Article #62038Re: [slrn] Piping an article to a bash script to view attachment.
From: John E. Davis
Date: Wed, 31 May 2000 00:00
Date: Wed, 31 May 2000 00:00
34 lines
1526 bytes
1526 bytes
On 31 May 2000 01:05:37 GMT, Steve <sjlen@ndirect.co.uk>
wrote:
>I've been using slrn for over six months now and have recently tried to put a
>simple bash script together that will decode a message and show me the attached
>image.
Use the uudecode program distributed with slrn (make uudecode), and
rename it to slrn_uudecode. Then create a shell script called uuxv
with the line:
#v+
(slrn_uudecode --stdout $1 | xv - &) <&0
#v-
Finally, use the macro:
#v+
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");
#v-
The net result is that pressing `v' will fire up xv and display the
encoded image.
--John
Technical Details
Message-ID:
<slrn8j92h1.am1.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-mailReferences:
<slrn8j88av.dfr.sjlen@zero-pps.localdomain>Show Full Headers
Complete Article Headers
Message-ID: <slrn8j92h1.am1.davis@aluche.mit.edu> Subject: Re: [slrn] Piping an article to a bash script to view attachment. Date: Wed, 31 May 2000 00:00:00 +0000 From: davis@space.mit.edu (John E. Davis) References: <slrn8j88av.dfr.sjlen@zero-pps.localdomain> 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: 629297845 X-Trace: dreaderd 959744547 10898 18.75.2.45 Organization: Center for Space Research User-Agent: slrn/0.9.6.3 (Linux) Reply-To: davis@space.mit.edu Newsgroups: news.software.readers