The ahab Command Line

The ahab utility is run from the command line as follows:

ahab [-options] [<inputHTML> | .<buildExtension> <templateHTML>]
The available options include:

-c[fname] : Use ahab configuration file [fname] (or "ahab.cfg" by default)
-e<ext> : Write outputHTML to files with extension <ext>
-h : Help
-o : Write outputHTML to stdout instead of file
-s : Use short file extensions (.htm instead of .html)
All options should be concatenated after the "-", with any options requiring additional text placed last. For instance, use "-oc" instead of "-o -c", and "-ocmyconfig.txt" instead of "-cmyconfig.txto".

Here are some example command lines and their effects:

ahab test.html test.template
This will apply the templateHTML that is in the file "test.template" to the inputHTML in "test.html". The default name of an ahab output file is the name of the input file, with the extension replaced with ".html" (or ".htm", if -s is selected). In this case, since the output file will have the same name as the input file, ahab renames "test.html" to "test.html.old" (if using -s, a similar renaming would occur, changing "test.htm" to "test.old") before building the output file.

ahab .html template
If the first argument to ahab (following any options) is an extension instead of a filename, ahab will apply the templateHTML file (in this case, "template") to every file in the current directory that has the extension. In this case, ahab will apply "template" to every ".html" file in the directory (renaming them ".html.old" in the process.)

ahab -s test.htm template.txt
This is essentially the same as the first example, except on an operating system that accepts only three-letter file extensions. In this case, "test.htm" is renamed "test.old" before it is rebuilt.

ahab -emyhtml test template
ahab will apply template to test, and place the output in test.myhtml.

ahab -cmyconfig.ahab
ahab will use the configuration file "myconfig.ahab" for its parameters instead of the rest of the command line.

ahab -o test.html test.template
This is the same as the first example, except that the output will be written to stdout instead of to the file test.html.

ahab -h
This will display a help screen, describing the available options.

Back to main ahab page

Pinback's Web Central
This page and the contents therein (except where otherwise attributed) are copyright (c) 1997, 1998, by Ben Parrish.
That was in case any of you devious types were thinking of stealing all my cool stuff. So there.
[ Lynx Now! ] This page is Lynx Enhanced, and here's why.
[ OWL Approved! ] This webpage adheres to the specifications set forth by the Optimal Web Layout (OWL) Committee.