home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / vrac / ged2ht23.zip / OPTIONS < prev    next >
Text File  |  1995-07-09  |  9KB  |  168 lines

  1. CUSTOMIZING GED2HTML WITH COMMAND-LINE OPTIONS
  2.  
  3. Ged2html is a Un*x-style program whose default behavior is to read a GEDCOM
  4. file from the "standard input," to create HTML files and possibly directories
  5. as output, and to write any error messages to the "standard error output".
  6. The behavior of the program can be modified in various ways through the use
  7. of "command-line options".  Under Un*x, a program is run by typing its name,
  8. followed by a list of "words," which are the arguments of the program.
  9. The Un*x convention is that command line-arguments that start with "-" are
  10. control flags that modify the behavior of the program.  Control flags can
  11. take parameters, which by convention are the words immediately following the
  12. control flag.
  13.  
  14. If you run this program under MS-DOS, you can supply command line options
  15. exactly as you would under Un*x.  (Note that the program does *not* recognize
  16. the MS-DOS conventions of control flags starting with "/" and parameters
  17. specified using ":" after the control flag.)  If you run the program under
  18. MS-WINDOWS, then you don't actually have a "command line" on which to
  19. specify the arguments, as it is intended that MS-WINDOWS programs should
  20. pop up a dialog box to obtain their arguments.  I haven't yet been inclined
  21. to do the necessary hacking necessary to make GED2HTML work this way under
  22. MS-WINDOWS, so if you want to run the program with other than the default
  23. options, you need to launch the program from the File Manager, which will pop
  24. up a dialog box into which you can type a command line exactly as if you
  25. ran the program under Un*x or MS-DOS.
  26.  
  27. Here are some examples of typical command lines and their effect on GED2HTML:
  28.  
  29.     ged2html myged.ged
  30.  
  31.         Run GED2HTML on the GEDCOM file "myged.ged", using the
  32.         default options and creating the HTML files containing
  33.         individual information in the current directory (or in
  34.         subdirectories of the current directory).  Also created
  35.         are index files "INDEX.html" and "SURNAMES.html"
  36.         ("INDEX.HTM" and "SURNAMES.HTM" under MS-DOS/MS-WINDOWS).
  37.         If the number of individuals exceeds the default "index width"
  38.         (currently 28), then "INDEX.html" is the root of a
  39.         hierarchical index organized into several files in such a way
  40.         that the total number of entries in each file is less than or
  41.         equal to the index width.  Finally, a textual index file
  42.         "GENDEX.txt" ("GENDEX.TXT" under MS-DOS/MS-WINDOWS) is created.
  43.         This file contains one line for each individual and is
  44.         output in a format suitable for processing by Unix tools
  45.         such as AWK and SORT.  It is intended for the use of network
  46.         indexing software that will automatically collect pointers to
  47.         individual data from a large number of sites and merge them
  48.         into a single master index.
  49.  
  50.     ged2html -i myged.ged
  51.  
  52.         Same as above, except that only the individual HTML pages
  53.         are created, and not the "INDEX.html", "SURNAMES.html"
  54.         or "GENDEX.txt" files.
  55.  
  56.     ged2html -c myged.ged
  57.     
  58.         Automatic capitalization of surnames is disabled, so that
  59.         surnames appear in the HTML output the same as they do in the
  60.         original GEDCOM file.
  61.  
  62.     ged2html -w 0 myged.ged
  63.  
  64.         The "index width" is set to zero, which disables the
  65.         production of a hierarchical index and arranges for all
  66.         individual entries to be placed in the single "INDEX.html"
  67.         file.
  68.  
  69.     ged2html -w 100 myged.ged
  70.  
  71.         The "index width" is set to 100.  This results in somewhat
  72.         fewer index files and a shallower index hierarchy than the
  73.         default setting.
  74.  
  75.     ged2html -i -c -s I1001 I1002 -- myged.ged    
  76.  
  77.         This command specifies that no index files are to be generated,
  78.         that automatic capitalization of surnames is disabled, and
  79.         that HTML output files should be produced *only* for the
  80.         individuals with cross reference ID's (XREF) I1001 and I1002
  81.         in the GEDCOM file.  An arbitrarily long list of ID's can be
  82.         specified after the "-s" flag, so that the "--" option is
  83.         needed to indicate the end of option processing and that all
  84.         remaining arguments are to be regarded as the names of GEDCOM
  85.         files.
  86.  
  87.     ged2html -d 100 myged.ged
  88.  
  89.         Cause the individual HTML files to be placed in subdirectories,
  90.         with a maximum of 100 files per subdirectory.  The hyperlinks
  91.         (URL's) placed in the HTML output files take the directory
  92.         organization into account.  This means that once you process
  93.         a GEDCOM file and create a tree of directories and HTML files,
  94.         you must preserve the organization of this tree if you want a
  95.         WWW browser to be able to traverse the links between the files.
  96.  
  97.     ged2html -d 0 myged.ged
  98.  
  99.         Specifying "-d 0" disables the use of subdirectories, so that
  100.         all individual HTML files are placed in the current directory.
  101.  
  102. Hopefully, you get the idea...    Here are a list of all the options currently
  103. understood by the program:
  104.  
  105. ged2html [-Hcgiv][-d <files-per-directory>][-n <indivs-per-file>][-s <individual> ...][-f <file-template>][-t <individual-template>][-T <index-template>][-w <index-width>][[--] <gedcom-file> ...]
  106.  -H                     Print a brief message listing the available options.
  107.  -v                     Print version number of program and copyright info.
  108.  -c                     Disable automatic capitalization of surnames.
  109.  -d files_per_directory Specify number of files per subdirectory
  110.                         (0 means don't use subdirectories).
  111.  -f file_template       Specify a template string for the names of the
  112.                         HTML files (default '%s.html' or '%s.htm').
  113.  -g            Force production of the textual index file (for use by
  114.             automatic indexers).
  115.  -i                     Do not generate index files containing entries
  116.                         for all the individuals and surnames in the input.
  117.  -n indivs_per_file     Output files contain specified number of individuals
  118.             (0 means don't put multiple individuals per file).
  119.  -p depth               Include pedigree charts of the specified depth
  120.             (0 means don't include any pedigree charts).
  121.  -s individuals ...     Limit the production of output files to a specified
  122.                         list of zero or more selected individuals.
  123.  -S surname_template    Specify a template file for surname index.
  124.  -t individual_template Specify a template file for individuals.
  125.  -T index_template      Specify a template file for individual index.
  126.  -w index_width        Create hierarchical index of specified width
  127.             (0 means put all individuals in one index file)
  128.  
  129. One of the features of GED2HTML is that output processing is completely
  130. controlled by user-specifiable programs, called "templates".  Templates are
  131. written in an awful programming language I designed specifically for this
  132. purpose.  Default templates, for the individual index, the surname index,
  133. and for the individual data files, are preloaded into GED2HTML when it is
  134. compiled.  Samples of the default templates have been provided for you in
  135. the files "index.tpl", "surname.tpl", and "indiv.tpl".  If you are happy with
  136. the output produced by the default templates, there is no reason for you to
  137. change them.  However, if you wish to modify the format of the output files
  138. in some way, you can use the "-T", "-S", and "-t" options to specify
  139. alternative template files.  For example:
  140.  
  141.     ged2html -t indiv.tpl -T index.tpl myged.ged
  142.  
  143. specifies that "indiv.tpl" is to be substituted for the preloaded individual
  144. template and that "index.tpl" is to be substituted for the preloaded index
  145. template file.  Since these files are supposed to be identical to the
  146. preloaded ones (unless I forgot to update the samples), the command above 
  147. should have the same effect as simply saying:
  148.  
  149.     ged2html myged.ged
  150.  
  151. On the other hand, if you edit "indiv.tpl" and "index.tpl" to create
  152. files, say, "myindiv.tpl" and "myindex.tpl", then you can say:
  153.  
  154.     ged2html -t myindiv.tpl -T myindex.tpl myged.ged
  155.  
  156. and get your own customized output.
  157.  
  158. If you want to create your own templates, feel free to try it, but be
  159. forewarned that I have not made much of an attempt to make template programming
  160. "idiot proof".  It is my expectation that most people will use the preloaded
  161. templates, and that if you want to make changes to the templates, you probably
  162. ought to be a programmer and you probably ought to read the output interpreter
  163. code in the file "output.c" to see exactly what the interpreter can and
  164. cannot do.  Otherwise, you can just play around making changes to the template
  165. files, using the code in the samples as a guide, but I make no guarantee that
  166. the program won't crash or otherwise behave strangely if you load in a
  167. malformed template.
  168.