htmldoc
index
/home/psgendb/BIRCHDEV/script/htmldoc.py

   htmldoc.py - Create web pages for BIRCH documentation from birchdb database
 
   Synopsis: htmldoc.py
 
@modified: May 28, 2014
@author: Brian Fristensky and Dale Hamel
@contact: frist@cc.umanitoba.ca

 
Modules
       
os
re
shutil
sys

 
Classes
       
Category
File
Package
Parameters
Program

 
class Category
     Methods defined here:
__init__(self)
Initializes arguments:
      name=""
      program=[]
      pkg=[]

 
class File
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
  Methods defined here:
__init__(self)
Initializes arguments:
      name=""
      description=""
      command='"$ACE_FILE_LAUNCHER" '
      path=""

 
class Package
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
  Methods defined here:
__init__(self)
Initializes arguments:
      name=""
      description=""
      category=[]
      doc=[]
      program=[]
      data=[]
      platform=[]
      installation=[]

 
class Parameters
    Wrapper class for global parameters
 
  Methods defined here:
__init__(self)
Get the location of the BIRCH home directory, BIRCHPATH 
Preferrably, we get it from the BIRCH.properties file,
but if that isn't found, we get it from the BIRCH
environment variable. The one catch is that since
we don't already know the location of BIRCHPATH,
the former will only work if the current working
directory is install-scripts. Normally, this would
only be used when installing or updating BIRCH
Otherwise, the environment variable will be read.

 
class Program
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
  Methods defined here:
__init__(self)
Initializes arguments:
      name=""
      description=""
      category=[]
      interface=[]
      package=""
      doc=[]
      data=[]
      sampleinput=[]
      sampleoutput=[]
      platform=[]

 
Functions
       
AddToList(L, NAME)
If a list contains NAME, do nothing
If it does not exist, append it to the list
@param L: The list to check for name
@type L: list
@param NAME: The name to be checked for
@type NAME: str
DUMPTOACE(P)
Dump the core BIRCH and local databases to .ace files
@param P: Instasnce of Paramters object
@type P: Parameters
DocRows(OUTFILE, H, HEADING, FILELIST, D, P)
Write rows for documentation lines:
Documentation, Data, Sample input, Sample output
 
@param OUTFILE: The name of the output file
@type OUTFILE: str
@param H: An instance of HTMLWriter
@type H: HTMLWriter
@param HEADING: The heading to place in each row
@type HEADING: str
@param FILELIST: The list of files to be documented
@type FILELIST: list
@param D: The dictionary to use for documentation
@type D: dictionary
@param P: An instance of the Parameters class
@type P: Parameters object
FreshDir(DIRNAME)
Delete an existing directory and create an empty directory
with the same name.
@param DIRNAME: The name of the directory to be refreshed
@type DIRNAME: str
GetStr(LINE)
Read the first string delimited by double quotes
@param LINE: The line to be cleaned up
@type LINE: str
 
Each quoted line is modified as follows:
     escape characters \ added by ACEDB are deleted
     '>' and '<' characters are changed to '&gt;' and '&lt;' so 
     they are not accidentally recognized by HTML as tag delimiters.
ReadCategory(FN, CATS)
Read category.ace into a list of category objects
@param FN: THe name of the file to be read
@type FN: str
@param CATS: The categories object to be read into
@type CATS: list
ReadDocFiles(FN, DOCFILES)
Read file.ace into a list of file objects
@param FN: The name of the file to be read in
@type FN: str
@param DOCFILES: the list of file objects to be read into
@type DOCFILES: list
ReadPackage(FN, PKGS)
Read package.ace into a list of Package objects
@param FN: The name of the file to be read in
@type FN: str
@param PKGS: The list of package objects to be read into
@type PKGS:list
ReadProgram(FN, PROGS)
Read program.ace into a list of Program objects
@param FN: The name of the file to be read in
@type FN: str
@param PROGS: The list of Program objects to read the file into
@type PROGS: list
WritePackagePage(PKGFN, P)
Write HTML page listing program packages.
@param PKGFN: The name of the html page to be created
@type PKGFN: str
@param P: An instance of the Paramaters object
@type P: Paramters object
WriteProgramPage(PROGFN, P)
Write HTML page listing programs in alphabetical order.
@param PROGFN: The basename of the page to be written
@type PROGFN: str
@param P: An instance of the Parameters class
@type P: Paramters object
main()
Called when not in documentation mode.
write_category_page(catfn)
FIXME
@param catfn:
@type catfn:

 
Data
        BM = <birchlib.Birchmod instance>
CATDICT = {}
DOCDICT = {}
HT = <birchlib.Htmlutils instance>
PKGDICT = {}
PROGDICT = {}
PROGRAM = 'htmldoc.py: '
PROGS = []
USAGE = '\n\t USAGE: htmldoc.py [currently takes no paramters]'
blib = None