![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I've got a way of viewing attachments from p.b.i in slrn,
just press "v" while the article is open and it opens
the display utility of ImageMagic with the attached image.
It'll view the first attachment fine, but doesn't load any
further attachments of a multi attachment post into
ImageMagic. I'd be glad if someone can advise me on how
to remedy this, the code is below for both the macro
and bash script.
## The bash script:
(slrn_uudecode --stdout $1 | display - &) <&0
## The slrn macro
## If you use this be sure to remove these comment lines.
## as in S-Lang comments start with % and not #.
define xv_view_article ()
{
call ("art_bob");
if (re_search_article ("^begin \\d+ "))
pipe_article ("uudisplay");
else
pipe_article ("uudisplay -64");
}
definekey ("xv_view_article", "v", "article");
To make it work I have recompiled slrn's own uudecode
utility and called it slrn_uudecode and put it in my
PATH, I've called my shell script uudisplay and
called the macro file uudisplay.sl
And in my .jnewsrc file I've included the line
interpret "/the/path/uudisplay.sl"
The person who wrote the original of this assumed that
XV would be used, but I can't get it to compile so
am using ImageMagic.
If anyone can help me to get multiple attachments to
work I'd be most grateful.
--
Cheers
Steve email mailto:sjl### [at] ndirect co uk
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.ndirect.co.uk/~sjlen/
or http://start.at/zero-pps
3:27pm up 4 days, 14:58, 2 users, load average: 2.01, 2.02, 2.00
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 4 Jun 2000 10:59:03 -0400, Steve wrote:
>
>
>I've got a way of viewing attachments from p.b.i in slrn,
>just press "v" while the article is open and it opens
>the display utility of ImageMagic with the attached image.
I have a program called "uudeview" that automatically decodes MIME and
UUEncoded images in my slrnpull spool, and I have a script that runs
after my nightly cron job to decode the day's new images:
---------------------------------
#!/bin/sh
echo Decoding new images.
ls >newrun
diff newrun prevrun \
| perl -ne "print if s/< (\\d+)/\\1/;" \
| xargs /usr/local/bin/uudeview -ifs -p decoded
rm prevrun
mv newrun prevrun
cd decoded
chmod 644 *
---------------------------------
Then I just use whatever tools I have to browse the images in decoded
and move them to another directory when I'm done. Here's what the
output from uudeview looks like for a sample post from a few days ago:
Note: No encoded data found in 34422
Loaded from 34423: 'REALLY complex images for inspiration ...' (REALLY): mission
_possible_frame.jpg part 1 Base64
Loaded from 34423: 'REALLY complex images for inspiration ...' (REALLY): mission
_possible_frame_102.jpg part 1 Base64
Loaded from 34423: 'REALLY complex images for inspiration ...' (REALLY): Colosse
o3.jpg part 1 Base64
Loaded from 34423: 'REALLY complex images for inspiration ...' (REALLY): gladiat
or_coliseum_frame3.jpg part 1 Base64
Loaded from 34423: 'REALLY complex images for inspiration ...' (REALLY): dinosau
r-c-480_explosion_frame.jpg part 1 Base64
Loaded from 34423: 'REALLY complex images for inspiration ...' (REALLY): dinosau
r-c-480_run_frame.jpg part 1 Base64
Note: No encoded data found in 34424
I'm not familiar with ImageMagick, but if it takes multiple images on the
command line, you could use uudeview to decode in a temp directory, then use
ls and xargs to start ImageMagick, then remove the temp directory when done.
Search freshmeat if you want uudeview.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thanks Ron
You've given me an idea, I want to do this per article so that
I don't have to know the image title in order to view it or them.
So I'll get my current macro and bash script to decode the article
into a directory, then open all the contents of that directory with
ImageMagic, then when I'm finished viewing, delete the contents of
the directory.
--
Cheers
Steve email mailto:sjl### [at] ndirect co uk
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.ndirect.co.uk/~sjlen/
or http://start.at/zero-pps
11:50pm up 8 days, 23:21, 2 users, load average: 2.02, 2.09, 2.10
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |