home *** CD-ROM | disk | FTP | other *** search
- CREATE_TB scans text files and creates a table by selecting specified line
- entries. The text files are assumed to contain standardized entries which are
- repeated in each file. CREATE_TB extracts a subset of these entries compressing
- their text into a specified column width for printing in a tabular form. The
- entries to be extracted and the width of each column may be specified by the
- user for each table. CREATE_TB will scan a group of files identified by a UNIX
- file pattern(including *, ?, or selectors [aeiou]) and it also recognizes PAGE
- headers of the form:
-
- :::::::::: --::::::::::
- FILENAME or --FILENAME
- :::::::::: --::::::::::
-
- as file separators.
-
- Within each file (or subfile), CREATE_TB selects lines whose first three
- characters match a selection field specified by the user. Once a line has been
- selected as the result of a match, subsequent lines with blanks in the first
- three columns are treated as continuations of the selected line. The first line
- of an entry is assumed to contain an entry title followed by a ':'. The entry
- title is used as a column header and does not appear as part of the text.
- Thus, the assumed format of an entry is:
-
- 001 ENTRY TITLE : entry text.................
- any number of continuation lines
- just so they start after column three
-
- Other than the three character ID field, the three line subfile header, and the
- entry title being delimited by a colon, no other assumptions are made on the
- source text file.
-
-
- OPERATION
-
- When CREATE_TB is run the user is prompted for three inputs. For example:
-
- ENTER TABLE_FILE_NAME=>my_table
- ENTER FIELD SELECTOR=>004:10 001:20 006:30
- ENTER NAMES OF FILES TO BE SCANNED=>tool_chest
-
- The TABLE_FILE_NAME is the name of the file in which the table will be created.
- The field selector is a list of ordered pairs, each consisting of a three
- character id followed by the column width. A ':' is used to separate each fieldof the ordered pair. Ordered pairs may be separated by blanks, commas,
- semicolons, or colons. Note that the total table width is the sum of the column
- widths plus 3times the number of columns. This width is printed on the screen
- at the start of table processing. Also each file or subfile name is printed as
- it is read. The last input is a single file name or a pattern indicating the
- set of files to be processed.
-
-
- SIMPLE EXAMPLE
-
- Assume a file similar to:
-
- ::::::::::
- TE.text
- ::::::::::
- 001 STATE : Texas
- 002 GOVERNOR : E. J. Junior
- 003 DESCRIPTION : The home of the Dallas Cowboys (aka America's Team)
- past World Champions.
- ::::::::::
- MD.text
- ::::::::::
- 001 STATE : Maryland
- 002 GOVERNOR : Neil Lomax
- 003 DESCRIPTION : The home of the Washington Redskins (aka District of Columbia)
- past World Champions.
- ::::::::::
- MO.text
- ::::::::::
- 001 STATE : Missouri
- 002 GOVERNOR : Roy Green
- 003 DESCRIPTION : The home of the St. Louis Cardinals (aka Up and Coming)
- have never been World Champions.
-
-
- a field selector of: 002:15 001:10 003:30
- would produce a table similar too:
-
-
- ===============================================================
- GOVERNOR | STATE | DESCRIPTION |
- ===============================================================
- E. J. Junior | Texas | The home of the Dallas |
- | | Cowboys (aka America's Team) |
- | | past World Champions |
- ===============================================================
- Neil Lomax | Maryland | The home of the Washington |
- | | Redskins (aka District of |
- | | Columbia) past World Champions.|
- ===============================================================
- Roy Green | Missouri | The home of the St. Louis |
- | | Cardinals (aka Up and Coming) |
- | | have never been World |
- | | Champions. |
- ===============================================================
-