Concatenate Impact Tables (cattab)
The cattab program is used to concatenate individual HTML tables produced
by the accounting program acct and produce a single merged table.
The program reads the individual impact tables listed on the command line, and
outputs the merged table to the screen. The output can be directed to a file as
needed.
Principles of Operation
The cattab program operates only on tables produced by the acct
program. For each of the files listed on the command line, cattab
extracts the pumping impacts for Colorado, Kansas and
Nebraska and the Nebraska mound impact for each sub-basin.
The program then writes a single HTML table consisting of all the results from
all the files, merged into a single table.
Command Reference
Input files are listed on the command line. Each input may consist of a file
name, or a file name followed by a qualifier. The file name and qualifier is
separated by a colon. The first qualifier is used as a title for the contents
of that file. If no qualifier is given, the file name is used instead. The
second qualifier can be used to set the background color for
items from this file. If a second qualifier is not specified, the background
color is white.
-t title
The title for the merged table can be specified using the -t option.
When the title contains embedded spaces, it must be quoted.
-m
The -m (merge) flag is used to reorder the output columns. By default,
the cattab program concatenates the output. That is, the first column is
the sub-basin name, followed by the four impacts from the first data file, then
the for impacts from the second data file, and so on. When the -m flag
is specified, the columns for each of the four impacts are merged. Therefore,
following the column with the sub-basin names, the Colorado pumping impacts will
appear with one column each for each of the data files, followed by the Kansas
pumping impacts, once column for each of the data files, and so on.
Example: Concatenate 2001 to 2003 impacts
The impacts in ../2001/2001.htm, ../2002/2002.htm and
../2003/2003.htm are concatenated in the file 200x.htm.
The output is shown here. Note that the main title is
taken from the first table and may not be appropriate.
cattab ../2001/2001.htm ../2002/2002.htm ../2003/2003.htm > 200x.htm
Example: Concatenate with titles
This example adds the main title Impacts 2001-2003 (acre-feet) to the
table and labels the groups 2001, 2002 and 2003,
respectively. The output is shown here.
cattab -t 'Impacts 2001-2003 (acre-feet)' ../2001/2001.htm:2001 ../2002/2002.htm:2002 ../2003/2003.htm:2003 > 200x.htm
Example: Merge Tables
This example reorders the results from the previous example so that the three
years appear next to each other for impact scenario. The output is shown
here. Note that default colors are added when tables
are merged.
cattab -m -t 'Impacts 2001-2003 (acre-feet)' ../2001/2001.htm:2001 ../2002/2002.htm:2002 ../2003/2003.htm:2003 > 200x.htm
Example: Concatenate with colors
This example concatenates the impacts and shows each year with a different color
background. The output is shown here.
cattab -t 'Impacts 2001-2003 (acre-feet)' ../2001/2001.htm:2001:yellow ../2002/2002.htm:2002:cyan ../2003/2003.htm:2003:lightgreen > 200x.htm
Example: Concatenate and merge with colors
This example concatenates the impacts and shows each year with a different color
background but merged. The output is shown here.
cattab -m -t 'Impacts 2001-2003 (acre-feet)' ../2001/2001.htm:2001:yellow ../2002/2002.htm:2002:cyan ../2003/2003.htm:2003:lightgreen > 200x.htm
Concatenate 2001 to 2003 impacts
Concatenate with titles
Merge Tables
Concatenate with colors
Concatenate and merge with colors
Home
| Index
| Previous
| Next
Model Units
Directory Structure
Programs
Static Files
Precipitation Data Entry
Colorado Data Entry
ET Data Entry
Stream Data Entry
Kansas Data Entry
Nebraska Data Entry
Running the Model