#!/usr/bin/env python
 
#/* Part of the Maestro sequencer software package.
# * Copyright (C) 2011-2015  Operations division of the Canadian Meteorological Centre
# *                          Environment Canada
# *
# * Maestro is free software; you can redistribute it and/or
# * modify it under the terms of the GNU Lesser General Public
# * License as published by the Free Software Foundation,
# * version 2.1 of the License.
# *
# * Maestro is distributed in the hope that it will be useful,
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# * Lesser General Public License for more details.
# *
# * You should have received a copy of the GNU Lesser General Public
# * License along with this library; if not, write to the
# * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# * Boston, MA 02111-1307, USA.
# */


import optparse,os,suites

# Executable segment
if __name__ == "__main__":

    # Command line argument parsing
    usage = "%prog [options]"
    parser = optparse.OptionParser(usage=usage)
    parser.add_option("-v","--verbose",dest="verbose",action="store_true",
                      help="verbose runtime output",default=False)
    parser.add_option("-l","--list",dest="list",action="store_true",
                      help="list active experiment paths",default=False)
    parser.add_option("-s","--suites",dest="suite_file",
                      default=os.path.join(os.getenv('HOME'),"xflow.suites.xml"),
                      help="file containing experiment information [%default]",metavar="FILE")
    (options,args) = parser.parse_args()

    # Obtain suite information
    suite = suites.Suites(options.suite_file)

    # Perform user-specified operations
    if options.list:
        suite.print_active()
