ARexx (6/41)

From:Andreas Mixich
Date:4 Aug 2000 at 13:47:48
Subject:reliable filetype recognition needed

Hello,

I am in search for a *really* good way for ftype recog in ARexx.

There are several ways, most easy rexxtricks.library/WhatIs() or
rexxtricks.library/FileID_Identify() or ADDRESS COMMAND 'GT'

The problems with these I have are:

WhatIs.library I prefer it, due to the possibility of the user being
able to configure it and add new filetypes.
I do not like it for exactly the same reason. Keeping
such a config up-to-date and reliable is too much work.
*Since config depends on user, no reliable IDs may be*
* assumed (I have ID="TGZ" You have ID="TarGZ")*
FileID.library Major trouble: *Identifies most ASCII files as "Unknown"*
Human readbale IDs are returned in catalogized strings.
*A script I write for english users does not work for*
* german users.*
Positive: List of known filetpyes is large. Library is
widley accepted.
Idm.library Nice, is powerful, but needs external command GT at the
moment. *Not very accepted/known.*
Dopus5 filetype Not usable, Dopus5 is *not all user's* favourite.
dataypes.library If it would fullfill all requests, the above
implementations would not exist...

So, how can I make sure, that, if my scripts finds an lha-archive on
your machine, that my script also identifies it as that ?

Of course, I know about the numbers of fileid.library

Internal, in the script, this would be okay, but as soon as I need the user
to input a filetype ID the problems start:

German:
0629 : PNG Bild

English:
0629 PNG Picture

I am writing a Convert.rexx script. It shall enable you to convert between a
zillion of filetypes, including PGP,MD5,Virus,Integrity check.
A frontend for all such actions, like (Lha2LZX,GIF2PNG,LZX2TGZ,ADF2ADZ,8SVX2WAF,etc.

Command template is, so far:

FROM/A input filename
AS/K optional output format
TO/K optional output filename
TEST/S test for integrity (ftype dependant)
CHECK/S check for virii
C=CHECKERPORT/K if u have an external Virus Checker running...
KEEP/S don't overwrite source with destination
H=HOSTING/S run as command host in background (ARexx-port: CONVERT)
WB/S interface is GUI/Workbench instead of STDIO
V=VERBOSE/S
LOG/K write errors to syslog (nice for backrounnd
processing)
LEVEL/K/N Loglevel, including invocation of external sendmail to sysadmin
(nice for networking or BBS or CRON sheduling overnight)
QUIET/S supress all output

I need a relaible ID for the user input of AS/K.

What can I do except sticking to the filename-extension. But, this is Amiga
and not Windows ! ;-)
Besides, "fcout.pre" is an LHA archive....

While I am on this I would like to express my disappointment with the OS3.5
hype (can't stop saying it, it is SUCH a hype, in my humble opinion !).

AmigaOS lacks in so many things.....Where are some new standards ?
Like: A styleguide for such file IDs...
A general, systemwide database engine. Store your hotlists, addresses,
disk-catalogs, mime-types, mime-actions etc. in ONE database,
accessible by any program with shared-library access.
This database could store filetype recogs. All the above
implementations could be dropped, except datatypes.library, which
could use this database for recog, or some interaction to the
devs:dataypes/#? files would be possible...

And I could write 20KB of text now......



Good Bye, Andreas
How you look depends on where you go.

ARexx mailing list - No flames, no overquoting, no crossposting. Unsubscribe: Blank mail to mailto:arexx-unsubscribe@onelist.com