Hi list,

here is another attempt to create a dir2htm function
for Arachne. No, I still do not know C programming! This
time the directory listings are processed by an awk script.
You will need a working DOS binary of the awk utility.

Download:

http://www.volny.cz/cce.zizkov/download/nextd2h.zip


Installation:
-------------

1. Make sure that awk.exe is in your path or copy
it to Arachne directory.

2. Copy the scripts d2h.awk and d2h.bat to Arachne
directory.

3. Insert these lines into your mime.cfg:

file/dir2htm.dgi     >HTM|call d2h.bat $e$2 $w
file/dir2htmr.dgi    >HTM|call d2h.bat $e$2 $s

4. If you want to call the function at any time you
will want to define a function key in arachne.cfg,
with the:

ShiftF3 file://dir2htm.dgi

If you do not need a function key, add the URL
file://dir2htm.dgi as a link or as a button to your
hotlist or to any other page of Arachne GUI.


How it works
------------

When your start dir2htm.dgi for the first time (or with
cleared cache) the program scans your download directory.
HTML files are listed by the contents of their title tags,
others by their file names. On the resulting page you
find buttons for upper and lower directories and an input
field to change the drive.


Customization
-------------

Change the layout of the listing as you like by altering
the file d2h.awk. If the starting point in the download
directory is not convenient for you, save one of the output
pages with F2 to your local disk and make further changes
in order to use it instead of dir2htm.dgi.


Known problems
--------------

Undoubtedly it makes sense to list not only HTML files.
This is why the scripts do not apply any file specifications.
On the other hand, awk is a text utility and not very good
in parsing binary files for title tags.

The sorting order of the lists are based on the DOS file
names, not on the title tags.

You cannot call dir2htmr.dgi without a query string and
you can apply dir2htm.dgi only to the download directory.
Of course it would be possible to do everything with just
one line in mime.cfg. If only somebody could explain, how
to make sure that the $s variable passed to the dgi will
be actually empty...

Christof Lange

_______________________________________________

 Christof Lange <[EMAIL PROTECTED]>
 Prokopova 4, 130 00 Praha 3, Czech Republic
 phone: (+420) 222 78 06 73 / 222 78 20 02
 http://www.volny.cz/cce.zizkov

Reply via email to