# SiteOutliner

### 1. What is it?

SiteOutliner is a sample tool using Java for XML. It scans directories and creates a CDF (Channel Definition Format), which can be read by either our CDF Viewer or Internet Explorer's channel bar.

### 2. How to run it?

#### 2.1 Start GUI

Although SiteOutliner can be used as a command line tool, a GUI interface is provided for easier use. To run the GUI version of SiteOutliner, type

    jre -cp 'xml4j.jar' com.ibm.xml.siteoutliner.SiteOutliner

from your command line. You need to have Java 1.1 installed in your PATH environment variable. You should specify a class path that include packages `com.ibm.xml.parser` and `com.ibm.xml.siteoutliner`. With a standard installation, these packages reside in the jar file named `xml4j.jar`. If they are located in a different place from `xml4j.jar`, you should replace it accordingly.

You will see the screen above. To start scanning, choose the File-Scan menu.
You will then see the parameter menu.

#### 2.2 Input Parameters

This panel shows various options. They are:

- Root Directory ... SiteOutliner starts with this directory and recursively search the descendant directories. Note that there is no directory separator at the end.
- Document Base URL ... path names from the Root Directory is prepended by this Document Base URL to form a complete absolute URL of each file.
- File Types ... you should specify file types to be included in the CDF. Normally they are .html, .htm., etc.
- Excluding ... you can specify file names or directory names to be excluded for scanning. Normally you want to specify directories such as `backup`, `archive`, etc.
- Newer than ... files modified since this date will be included in the CDF. Default is 24 hours before the current time.
- Search Depth ... scanning is limited by this depth. If the directory structure forms a loop by means of symbolic links, you must specify this value to stop infinite search. Default is 10.

Once it is ready, press the `Doit` button and SiteOutliner starts scanning the directories. It takes few seconds to several hours to complete, depending on the number of files to scan and of course the processor speed. We recommend to carefully specify directories to be excluded, as well as the use of a Java JIT compiler.

#### 2.3 Check Results and Save

When the scanning is finished, the results are displayed in the text pane. This has a standard text editing function so you can check and edit the contents if necessary. If it is not satisfactory, you can scan again. If it is ok, choose the File-Save menu to save the contents to a CDF file. The CDF file can be placed anywhere on your website which is accessible from users.

### Command Line Processor

SiteOutliner is most effective if you run it automatically with a predetermined schedule such as every day. To do it easier, SiteOutliner is designed so that all the options can be given as command line parameters. The basic command line syntax is as follows:

    jre -cp 'xml4j.jar' com.ibm.xml.siteoutliner.SiteOutliner [options] dir url

where dir is the starting directory and url is the base URL.

You can specify the following options:

- -help ... displays help messages
- -debug ... set debug mode on
- -since date ... specify the since date
. The date format is determined by the current locale. If the date is given as a negative integer, it is interpreted as 'days before' (e.g., `-since -7` means "since last week").
- -filetype filetypes ... file types separated by ';'. Default is ".htm;.html;.HTM;.HTML"
- -exclude filenames ... file and/or directory names to be excluded, separated by ';'s. Defaults to "" (null).
- -encoding javaencoding ... if you know you are processing files that have a different encoding rule than the one in the current locale, you can specify an encoding spec, as in defined in Java `InputReader` class, as in `JISAutoDetect`.
- -outendoding mimecharset ... MIME charset name for output.
- -depth depth ... limit depth of search
- -sort ... Sort elements by title

Go to README

Last modified: Fri Feb 06 13:46:34 JST 1998