def main(): usage = "usage: %prog [options] gtfs_filename" parser = OptionParser(usage) parser.add_option("-o", "--output_filename", dest="output_filename") options, args = parser.parse_args() if len(args) != 1: parser.error("No gtfs filename supplied") gtfs_filename = args[0] if options.output_filename: output_filename = options.output_filename else: output_filename = os.path.splitext(gtfs_filename)[0] + ".db" load(gtfs_filename, output_filename)
def setUp(self): self.schedule = load( "test/data/sample-feed.zip" )
def setUp(self): curpath = os.path.dirname(os.path.realpath(__file__)) feedpath = os.path.join(curpath, "data/sample-feed.zip") self.schedule = load(feedpath)
def setUp(self): curpath = os.path.dirname(os.path.realpath(__file__)) feedpath = os.path.join(curpath,"data/sample-feed.zip") self.schedule = load( feedpath )
def setUp(self): self.schedule = load("test/data/sample-feed.zip")