KwdList

KwdList, HTML Multi-File Keyword Adder

This application displays a selectable list of keywords in a window, and adds the selected keywords to one or more HTML files that are dragged and dropped onto the KwdList window from Windows Explorer.

Usage: KWDLIST  [/W[basepath]] kwdfile

options:
/W[basepath]   Enables clipboard watch mode, and optionally specifies the path to the directory that is used as a base path for local "http:" URLs. If basepath is not specified, it defaults to the root directory of the drive which contains the current working directory for DropHTM.
kwdfile   The name of the keyword file.

To use this utility, perform the following steps:

  1. Invoke the application, supplying a keyword file as the command-line argument. A window will appear with the list of keywords from the keyword file. The window may be resized as needed.
  2. Invoke Windows Explorer and find the files you wish to modify.
  3. In the KwdList window, select the keywords that you wish to add.
  4. Drag the HTML file(s) you wish to modify from the Explorer window into the KwdList window. The selected keywords will be immediately added to the keyword lists of the dropped files.
  5. As an alternative, you can press the Copy button to copy the list of selected keywords to the clipboard as a text list.
  6. You can clear all selections by pressing the Clear button, and then repeating the steps starting at step 2 above for other files.
  7. When you no longer need the KwdList window, press the Close button.

This utility will only add keywords to the dropped files. To remove keywords, you most use the DropHTM utility.

Files other than HTML files may be dragged onto the window. When this happens, the HTML file with the same base name will be modified. If an HTML file with the same base name does not exist, one will be created.

File folders (directories) may also be dragged onto the window. When this happens, the corresponding index file which is contained in the directory is modified. An index file must be named "index.htm", "index.html", "welcome.htm", or "welcome.html". If an index file does not exist for the directory, one will be created with the name "index.htm".

If a single file is dropped onto the KwdList window when no keywords are selected, the keyword list is read from the dropped file, and the corresponding keywords in the window are automatically selected.

Context Help

If you right-click on a keyword in the list, a description of that keyword will be displayed if one is available in the keyword file.

Keyword Files

A keyword file is a file which contains a list of keywords and, optionally, their definitions. Keywords appear in the KwdList window in the same order as they appear in the keyword file.

Format 1: Simple List

A simple keyword file is a single list of keywords and optional definitions. The file must be in the following format:

keyword     [ TAB     description ]
keyword     [ TAB     description ]
keyword     [ TAB     description ]
keyword     [ TAB     description ]
keyword     [ TAB     description ]
...

Each line consists of a single keyword, optionally followed by one or more tab characters and a description of the keyword. Keywords must not be preceeded by spaces (must start at the beginning of the line). The description will appear when the keyword is right-clicked.

The description may contain embedded newline characters in the form "\n". It may also span multiple lines by beginning each subsequent line with one or more tab characters. Two examples of multi-line description syntax are shown below:

keyword     TAB     description-line-1 \n description-line-2
keyword     TAB     description-line-1
    TAB     description-line-2
    TAB     description-line-3

Format 2: Outline

An outline keyword file is subdivided into one or more sections, each with a section heading. Section headings cannot be selected to appear in the keyword list, and are used only to make the list easier to read. The file must be in the following format:

Heading
SPACE   keyword     [ TAB     description ]
SPACE   keyword     [ TAB     description ]
SPACE   keyword     [ TAB     description ]
...
Heading
SPACE   keyword     [ TAB     description ]
SPACE   keyword     [ TAB     description ]
SPACE   keyword     [ TAB     description ]
...

Heading lines must not be preceeded by spaces (must start at the beginning of the line). Keyword lines must be preceeded by one or more spaces (indented), and will be displayed along with the preceeding space(s). Otherwise, they are the same as the Simple List.

Keyword Rules

Keyword rules provide a way to automatically select or deselect keywords based on other keywords. For example, you can make a rule that keyword "color" must appear in the keyword list if the keywords "red", "green", or "blue" are selected.

Keyword rules may appear anywhere in the keyword file. They do not appear in the KwdList window. Each rule must appear on its own line, begin with a '?' character in column 1, and follow the keyword rule syntax. All rules are evaluated each time a keyword in the list is selected or deselected. They are evaluated in the order in which they appear in the keyword list. Keywords that are added to the keyword list by a rule need not appear in the keyword file as a user-selectable keyword.

For example, you can use the following rule to make sure the keyword "color" is included in your list whenever "red", "blue", or "green" is selected:

   ?red|blue|green,+color

Comments and Blank Lines

Comment lines and blank lines are ignored. Comment lines must begin with a '#' character in the first column. The entire line is a comment. Blanks lines must not contain any space or tab characters.

Clipboard Watch Mode

This application provides an optional "clipboard watch mode" which watches the Windows clipboard for local file URLs. When this mode is enabled, users can browse local files with their favorite web browser, and easily add keywords to viewed web pages without opening an Explorer window.

The following command line syntax enables the clipboard watch mode:

   kwdlist /W[basepath] keywordfile

Where, basepath is the optional path to the directory that is used as a base path for local "http:" URLs (see description below), and keywordfile is the keyword file. If basepath is not specified, it defaults to the root directory of drive which contains the current working directory for KwdList.

When a local file URL is copied to the clipboard from any application (usually a web browser), it has the same effect as dragging and dropping the HTML file on the KwdList application. KwdList will display a verification dialog box before making any changes to the file.

If you are using Netscape or Internet Explorer, you can use one of the following methods to copy a local file URL to the clipboard:

Other browsers may provide similar methods.

The URL that is copied to the clipboard must be in one of the following formats. Any other format will be ignored by KwdList.

   1.  file:///drive:/path
   2.  file:///drive|/path
   3.  http://127.0.0.1/path
Where, drive is a drive letter, and path is an absolute path (starting at the root directory) to a file on that drive. Syntax 2 is allowed for compatibility with Netscape. Syntax 3 is used for local testing when using a web server. In this mode, drive is not specified, and the path is appended to the basepath specified by the /W option on the command line (see description above).

If the file specified by the URL does not exist, KwdList will ignore it and quietly do nothing.


Table of Contents
Copyright © 1996-2003 Christopher P. LaRosa. All Rights Reserved.