# date (MM/DD/YYYY) # long (decimal degrees) # lat (decimal degrees) # species import dycast import optparse usage = "usage: %prog [options] datafile.tsv" p = optparse.OptionParser(usage) p.add_option('--config', '-c', default="./dycast.config", help="load config file FILE", metavar="FILE") options, arguments = p.parse_args() config_file = options.config dycast.read_config(config_file) dycast.init_logging() dycast.init_db() # If arguments includes multiple filenames, fileinput will handle them all for file in arguments: (lines_read, lines_processed, lines_loaded, lines_skipped) = dycast.load_bird_file(file)
default="3", help="run NUMDAYS into past", metavar="NUMDAYS" ) # If these options are not specified, defaults will be taken from the config file p.add_option('--closespace') p.add_option('--closetime') p.add_option('--spatialdomain') p.add_option('--temporaldomain') options, arguments = p.parse_args() config_file = options.config try: dycast.read_config(config_file) except: print "could not read config file:", config_file sys.exit() dycast.init_logging() dycast.init_db() (default_cs, default_ct, default_sd, default_td) = dycast.get_default_parameters() if options.closespace: cs = options.closespace else: cs = default_cs if options.closetime:
def connect_to_DYCAST(self): dycast.read_config(config_file) dycast.init_db() dycast.init_logging()