home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 7
/
FreshFishVol7.bin
/
new
/
comm
/
net
/
mosaic
/
contrib
/
mshunt
/
mosaic_shunt.doc
< prev
next >
Wrap
Text File
|
1994-06-12
|
5KB
|
125 lines
Mosaic_Shunt 1.0
An AREXX script for Amiga Mosaic
(c) 1994 Aaron Weiss
DISCLAIMER(S): This product is ImproveWare (tm), which means that it is Freely
Distributable and modifiable; just give me credit somewhere. Please,
I beg of you. Considering that this is my first AREXX program, and not
all that an important one at that, it would benefit all if anyone with
more AREXX panache than me could gussy it up more. Nonetheless, I am the
original author and want to be immorta--er, remembered that way. Thanks.
Introduction
One of the "problems" (features, or whatever your fancy) of Amiga Mosaic is
that whenever it retrieves a file destined for external viewing, it transfers
the file into some temp file, send it along its way via the commandline
provided in the .mailcap file, and then deletes it. One of the unfortunate
side effects of this behavior is that should the file fail to be deal with
correctly, such as if you didn't have enough memory to display it,
Amiga Mosaic would delete it before you could even gasp for help. Furthermore,
sometimes, even if the file did show/sound correctly, you might want to save
it anyway for future viewing and/or listening pleasure. Hence this shunt,
which reroutes, via the .mailcap file, said file and deals with it in
a friendlier manner.
Overview of the Shunt
In short, this program works on the following logic:
1) Figure out what type of file this is (i.e. GIF, JPEG, 8SVX, etc.)
2) Send it to be shown/played via appropriate program
3) Allow the user the option of saving it for future use
INSTALLATION
Just put this wherever you want, though REXX: seems a nice and
logical place. Then call it in the .mailcap entries rather than
whatever you are calling now. For example, use the entry:
image/*; rx REXX:mosaic_shunt.rexx %s
in the .mailcap. If you're reading this file you probably know how
to use the .mailcap by now, so I won't bore you any longer with this.
Note that this archive includes two versions of the program, one
with all explanatory comments in place for beauty's sake, and the
other with them all stripped out for speed's sake. Use whichever
tickles you most.
Use and Operation
Using the shunt is easy, once you know how! In it's current
state it has no external preferences file, as such, so all
user preference changes are made in the code at the top
of the program. Considering that this is all well marked
out and commented within the code, I really don't think this
is much of a problem. An external prefs file might be forseeable,
but only if I really find it necessary.
Here's a quick and dirty run down of the settings, and I think
this should more than cover it:
savemode=x
x may equal the number 1, 2, or 3, each meaning the following:
1 - Never save the file, just try to show it and return to Amiga Mosaic.
2 - Option to save file.
After attempting to show or play the file, an ASL file requestor
will appear, from where you can choose a place and name for the file
to be saved. Alternatively, you can hit CANCEL in the requestor
and abort the save.
3 - Always save file. This won't annoy you with a file requestor
after every externally spawned file, but it will use the
cryptic filename that Amiga Mosaic used to save the file
originally, only this time it will be placed in your
preference defined save drawer (to be discussed next).
savedrawer=STRING
Just enter STRING as the name of the drawer you want
to save automatic (#3 above) files to, or that the
file requestor will default to (#2 above). Note that
the STRING should be between single quotes (') and,
of course, if your drawer name has spaces use double-
quotes around that (") within the single quotes. Some examples:
savedrawer='temp:pix/mosaicpix'
savedrawer='temp:pix'
savedrawer='"temp:Mosaic Pictures"'
The rest of the settings are for the viewers themselves. Note
that this is not a flexible system, and as such only currently
supports viewers for JPEG, GIF, IFF, ANIM, 8SVX, and AU format files.
Adding others is rather trivial, and I probably will in the very
near future, once I learn what to parse for in their headers.
For these, just enter the commandline, between single
quotes, that you would normally use to execute the program
from a shell. Use path and parameters as necessary. Insert a
%s wherever the filename would normally go, and note that you
CAN use multiple %s in the same line if you want the filename
to appear more than once on a line. Some examples:
iffviewer='graphics:vt/vt screenmode="super72:super-high res laced" %s'
Note the use of double-quotes above where they would normally be
necessary in this command were it in a shell.
gifviewer='graphics:vt/vt %s SAVE %s.iff'
This execute ViewTek using the parameter for saving the displayed
picture as an IFF.
...well, that's all! I can't think of much else to say, except that
I will continually try to improve this - and my AREXX skills at the
same time - as I play with Amiga Mosaic, and as it improves
(great job, guys!).
Questions, Comments, Complaints, Refunds, Hot Email to
Aaron Weiss
mw12@crux2.cit.cornell.edu (at _least_ until 5/94. after that who knows?)