Command Line Interfaces

ConfigSystem provides a small set of command line executables in the bin subdirectory, which can be used to examine and manage configuration in MOOT. As much as possible, they obey similar syntax.

Ancillary File Management

The ConfigSystem command line executable for managing ancillary files, bin/AncillaryManager.py, can be used to:

  • List all the ancillary of a particular type.
  • Read and validate an ancillary file before importing it into MOOT.
  • Import an ancillary into MOOT.
  • Set an alias to point at an ancillary already in MOOT.

Listing ancillary files

The command line syntax to list ancillary files of the type <FILE_TYPE> already in MOOT is:

  bin/AncillaryManager.py <FILE_TYPE> --list [a,f]  
Giving "a" as an argument will print out all the aliases and their associated ancillary files. Giving "f'' as an argument will print out all the ancillary files and any associated aliases. If both arguments are given, both printout will be made.

Test reading an ancillary file

The command line syntax to validate an ancillary file of the type <FILE_TYPE> not yet in MOOT is:

  bin/AncillaryManager.py <FILE_TYPE> --read <FILE_NAME>  
This will produce a message telling if the ancillary is valid and can be imported into MOOT.

Importing an ancillary file

The command line syntax to import an ancillary file of the type <FILE_TYPE> into MOOT is:

  bin/AncillaryManager.py <FILE_TYPE> --import 
<FILE_NAME> -T FILE_TAG [-a -b -A ALIAS*]
This will import the ancillary into MOOT under the name <ID>_<FILE_TYPE>_<FILE_TAG>.xml, where <ID> is serial number supplied by MOOT to insure unique file names. If the -a option is supplied an alias pointing to the imported file will be added. By default the alias will by the same as the file tag, but this can be overridden by using the -A <ALIAS> option. If the -b option is supplied, then the existing alias will be moved to <ALIAS>_old. If more that one value is given for the -A option, each alias will point to the imported file.

Setting the aliases to an imported ancillary file

The command line syntax to set an alias to an ancillary file of the type <FILE_TYPE> already imported into MOOT is:

  bin/AncillaryManager.py <FILE_TYPE> --set_alias <FILE_KEY> [-b] -A ALIAS*  

This will set the <ALIAS> to point to the file already in MOOT under the key <FILE_KEY>. If the -b option is supplied, then the existing alias will be moved to <ALIAS>_old. If more that one value is given for the -A option, each alias will point to the imported file.

 

Precinct Management

The ConfigSystem command line executable for managing precinct-level vote files, bin/PrecinctManager.py, can be to:

  • To list all files associated with a particular precinct.
  • To read and validate a vote file before importing it into MOOT.
  • To import a vote into MOOT.
  • To set an alias to point at a vote already in MOOT.
  • To examine a vote file and get a printout of the values in the file.
  • To copy vote file and replace one or mode values in the new vote file.
  • To build parameter files from a vote file already in MOOT.

Note that the first four of these actions are the same as for bin/AncillaryManager.py. With a few exceptions noted below, they obey the same syntax.

Listing information associated with the precinct

The command line syntax to list the vote files for <PRECINCT> which are already in MOOT is:

  bin/PrecinctManager.py <PRECINCT> --list [a,f,d,b,p] [FILTER_OPTIONS]  
Giving ``a'' or ``f'' will behave the same as for bin/AncillaryManager.py. Giving ``d'' as an argument will print out all the vote files along with and current resolutions of the ancillary file aliases. Giving ``b'' as an argument will print the existing built groups of parameter files, sorted by which vote files they are generated from. Giving ``p'' as an argument parameter files and list associated vote and ancillary files for each. If more that one printout is requested, they will all be made.

Test reading a vote file

The command line syntax to validate a vote file for <PRECINCT> which is not yet in MOOT is:

  bin/PrecinctManager.py <PRECINCT> --read <FILE_NAME> [-o]  
This will produce a message telling if the vote is valid and can be imported into MOOT. If the -o option is supplied the LATC_XML for that vote file will be dumped to the screen. Note that this test includes resolving reference to ancillary files.

Importing a vote file

The command line syntax to import a vote file for <PRECINCT> into MOOT is:

  bin/PrecinctManager.py <PRECINCT> --import <FILE_NAME> -T FILE_TAG [-a -b -A ALIAS*]  
This action functions exactly the same as with bin/AncillaryManager.py.

Setting the aliases to an imported vote file

The command line syntax to set an alias to a vote file for <PRECINCT> which is already imported into MOOT is:

  bin/PrecinctManager.py <PRECINCT> --set_alias <FILE_KEY> [-b] -A ALIAS*  
This action functions exactly the same as with bin/AncillaryManager.py.

Examining a vote file

The command line syntax to print out the values in vote file(s) for <PRECINCT> which are already imported into MOOT is:

  bin/PrecinctManager.py <PRECINCT> --examine [FILTER_OPTIONS]  
This will dump out the values of all the variables in all the vote which pass the FILTER_OPTIONS.

Copying a vote file and replacing one or more variables

The command line syntax to copy and modify a vote file for <PRECINCT> is:

  bin/PrecinctManager.py <PRECINCT> --copy <ALIAS> -T <FILE_TAG> [-n] [-a -b -A ALIAS*]  
This will copy the vote file pointed to by ALIAS into MOOT under the name <ID>_<PRECINCT>_<FILE_TAG>.xml, where <ID> is serial number supplied by MOOT to insure unique file names. The -a, -b and -A options allow the user to also set aliases during this operation. If the -n option is set, the file will not actually be copied, but the values will be printed instead.

Building Parameter files for a precinct

The command line syntax to build the parameter files for <PRECINCT> is:

  bin/PrecinctManager.py <PRECINCT> --build [-o -n] [FILTER_OPTIONS]  

If the -o option is supplied the LATC_XML for that vote file will be dumped to the screen. If the -n option is supplied the the files will not actually be built or imported into MOOT, but all the rest of the processing will occur.

 

Configuration Management

The ConfigSystem command line executable for managing LAT-level vote files, bin/ConfigManager.py, can be to:

  1. List LAT configurations and the files associated with each.
  2. Read and validate a vote file before importing it into MOOT.
  3. Import a vote into MOOT.
  4. Set an alias to point at a vote already in MOOT.
  5. Examine a vote file and get a printout of the values in the file.
  6. Copy vote file and replace one or mode values in the new vote file.
  7. Build parameter files from a vote file already in MOOT.
  8. Print a table with LAT configurations and aliases.
  9. Print the dependencies for ancillary and vote files.

Note that the first seven of these actions are the same as for bin/AncillaryManager.py and bin/PrecinctManager.py. With a few exceptions noted below, they obey the same syntax.

Listing information associated with the LAT configuration

The command line syntax to list the vote files for LAT configurations already in MOOT is:

  bin/ConfigManager.py <TYPE> --list [a,f,d,b,p] [FILTER_OPTIONS]  
Giving ``a'',``f'',``d'' or ``p'' will behave the same as for bin/PrecinctManager.py.

Test reading a vote file

The command line syntax to validate a LAT-level vote file not yet in MOOT is:

  bin/ConfigManager.py <TYPE> --read <FILE_NAME> [-o]  
This action functions exactly the same as with bin/PrecinctManager.py.

Importing a vote file

The command line syntax to import a vote file for <PRECINCT> into MOOT is:

  bin/ConfigManager.py <TYPE> --import <FILE_NAME> -T FILE_TAG [-a -b -A ALIAS*]  
This action functions exactly the same as with bin/PrecinctManager.py.

Setting the aliases to an imported vote file

The command line syntax to set an alias to a LAT-level vote file which is already imported into MOOT is:

  bin/ConfigManager.py <TYPE> --set_alias <FILE_KEY> [-b] -A ALIAS*  
This action functions exactly the same as with bin/PrecinctManager.py.

Examining a vote file

The command line syntax to print out the values in a LAT-level vote which is already imported into MOOT is:

  bin/ConfigManager.py <TYPE> --examine [FILTER_OPTIONS]  

This action functions exactly the same as with bin/PrecinctManager.py. Note that the only variable in the LAT-level vote files are the aliases for each of the precincts.

Copying a vote file and replacing one or more variables

The command line syntax to copy and modify a vote file for <PRECINCT> is:

  bin/ConfigManager.py <TYPE>  --copy <ALIAS> -T <FILE_TAG> [-n] [-a -b -A ALIAS*]  
This will copy the vote file pointed to by ALIAS into MOOT under the name <ID>_<TYPE>_<FILE_TAG>.xml, where <ID> is serial number supplied by MOOT to insure unique file names. The -a, -b and -A options allow the user to also set aliases during this operation. If the -n option is set the file will not actually be copied, but the values printed instead.

Building Parameter files

The command line syntax to build the parameter files for <PRECINCT> is:

  bin/ConfigManager.py <TYPE> --build [-o -n] [FILTER_OPTIONS]  
If the -o option is supplied the LATC_XML for that vote file will be dumped to the screen. If the -n option is supplied the the files will not actually be built or imported into MOOT, but all the rest of the processing will occur.

Printing a table of LAT configurations and vote aliases

The command line syntax print out a comma-separated-value (csv) table of all the LAT configurations and their vote aliases is:

  bin/ConfigManager.py <TYPE> --table [FILTER_OPTIONS]  
This will just print out a table with one configuration per line.

Printing the dependencies for ancillary and vote files

The command line syntax print out the dependencies for ancillary and vote aliases is:

  bin/ConfigManager.py <TYPE> --depend [a|d|v|u] [FILTER_OPTIONS]  
 

Release Management

The ConfigSystem command line executable for working with the entire set of configures bin/Builder.py, can be used to:

  • To list LAT configurations and show which ones are out of data.
  • To build parameter files and configurations for all vote files.
  • To print a table with LAT configurations and aliases.
  • To print the dependencies for ancillary, vote and parameter files.

Listing information associated with the LAT configuration

The command line syntax to list the vote files for LAT configurations already in MOOT is:

  bin/Builder.py --list  
This will list all the currently defined configurations as well as their status as being up to date or not.

Building Configurations

The command line syntax to build all the parameter and LAT configurations is:

  bin/Builder.py --build [-n]  
If the -n option is supplied the files will not actually be built or imported into MOOT, but all the rest of the processing will occur.

Printing a table of LAT configurations and vote aliases

The command line syntax print out a comma-separated-value (csv) table of all the LAT configurations and their vote aliases is:

  bin/Builder.py --table  
This will just print out a table with one configuration per line.

Printing the dependencies for ancillary and vote files.

The command line syntax print out the dependencies for ancillary and vote aliases is:

  bin/Builder.py --depend [a|d|v|u]  

 


Owned by: Eric Charles
Last updated by: Chuck Patterson 01/22/2008