Package buildxml :: Module getXML
[hide private]
[frames] | no frames]

Module getXML

source code

This is the main script to gather all information from the various sources to build the XML file with all the data to be fed to the parser.

For command line usage see usage() .


Author: Johannes Schwenk

Copyright: 2010, Johannes Schwenk

Version: 2.0

Date: 2010-09-15

Functions [hide private]
 
version()
Print out the programs version to stdout.
source code
 
usage()
Print out the version and command line usage information.
source code
 
run(argv)
Collect all needed information from command line arguments and act accordingly.
source code
Variables [hide private]
  XML_TEMP_FILENAME = u'%s/%s' %(TEMP_DIR, u'.raw.'.join(XML_FIL...
Temporary XML file of the acquired data.
Function Details [hide private]

usage()

source code 

Print out the version and command line usage information.

Usage:

   $./getXML.py [options]

   Command line options:
   -v               | --version : Print version information, then exit.
   -h               | --help : Print this text, then exit.
   -n               | --nonet : Do a run without fetching data from the net.
   -p <PLUGIN_NAME> | --plugin=<PLUGIN_NAME> : Load only the specified plugin.
                       Requires presence of the -s parameter.
   -s <SOURCE_NAME> | --source=<SOURCE_NAME> : Together with the -p parameter,
                       loads only the plugin for the specified source.

run(argv)

source code 

Collect all needed information from command line arguments and act accordingly.

Checks for available disk space and issues a warning to the logfile if the remaining space is less than 6 times that of the space already used by the scripts directory and subdirectories.

If the command line parameters are not -h, -v or their long versions, instantiate a Controller and call its run method.


Variables Details [hide private]

XML_TEMP_FILENAME

Temporary XML file of the acquired data. Will be moved to ./config.OUT_DIR/config.XML_FILENAME after removeInvalidUTF8 has been called on it.

Value:
u'%s/%s' %(TEMP_DIR, u'.raw.'.join(XML_FILENAME.split(u'.')))