Topic: File list maintaining and converting to HTML tool (1 of 1), Read 27 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Wednesday, May 15, 2002 04:55 PM

I've created a new macro...

As description I've copied the inline comments here:


It creates a list of files from a directory listing (DIR) and merges it with a (possibly)
already existing definition file.

This definition file is like a table with one line for every file.
Each line describes one file with category, title, short description and filename.

If there are files in the directory but not in the definition file they will be appended there.
If there are files in the definition file but not (longer) really existing in the
directory they will be marked as "inactive" in the definition file.

Editing the definition file by adding more descriptions or change existing ones and
restarting the macro will sort the entries again by category and reformat it to line up
the columns.
So you can maintain the definition file part for part and you will have a table of
contents this way.


The key assignments are:

F11 : Open the file the cursor is on (line) into another VEDIT window (and close it again)
Shift-F11 : add the appropriate column deviders in the current line
Ctrl-F11 : like Shift-F11, but jump a line down then for following additions

F12 : convert it again to HTML
Shift-F12 : restart the macro (reload file list, resort and reformat, convert to HTML)



As second feature the macro converts the definition file into a HTML document consisting
of a bunch of tables - one table for each category.


Here is an example:
--------------------

*TITLE: Example list of files
*
*INTRO: This is an example definition file for CONV-LIST.VDM
*INTRO:
*
* filename category title short description
*--------------------|-------------------------|-----------------------------------------|--------------------
***
COMPDIR.VDM | 01 - enhanced originals | |
Checkparen.vdm | 02 - Programming | Parenthesis checker |
chkgotos.vdm | 02 - Programming | Goto checker | checks gotos
adel2.vdm | 02 - Programming | Auto backspace | Auto backspace like in Borland IDE's
book2adr.vdm | Converter | Converts Opera's (?) bookmarks to HTML |

This little definition file would be converted into a HTML page with the defined title line
and with a short introduction text.
Then there will follow 3 tables for the three categories.


I've developed this macro to maintain a part of my website, where I'm listing many of
VEDIT macros. (As side effect I'm forced to document the macros a bit more... :-) )


The site is still under construction but if you want to have a look (to see this macro at work):

http://home.t-online.de/home/Christian.Ziemski/vedit



Since it's a work in progress this documentation is to be improved....



Christian

 
CONV-LIST.VDM (21KB)