예제 #1
0
def main():
    if len(sys.argv) < 2:
        interval = defaults.INTERVAL
    else:
        try:
            interval = int(sys.argv[1])
        except ValueError:
            utils.error('Requires an integer interval argument')
            _usage()
            sys.exit(1)
    root = os.path.dirname(os.path.realpath(__file__))
    getter.run_update(root, interval)
    processor.create_json(root)
    loader.post_json_files(root)
def main():
    if len(sys.argv) < 2:
        interval = defaults.INTERVAL
    else:
        try:
            interval = int(sys.argv[1])
        except ValueError:
            utils.error('Requires an integer interval argument')
            _usage()
            sys.exit(1)
    root = os.path.dirname(os.path.realpath(__file__))
    getter.run_update(root, interval)
    processor.create_json(root)
    loader.post_json_files(root)
예제 #3
0
def main():
    if len(sys.argv) < 3:
        utils.error('Requires a start and end date')
        _usage()
        exit()
    start = sys.argv[1]
    end = sys.argv[2]
    idx = None
    if len(sys.argv) == 4:
        try:
            idx = int(sys.argv[3])
        except ValueError:
            utils.error("Index argument must be an integer")
            sys.exit(1)
    root = os.path.dirname(os.path.realpath(__file__))
    getter.run_batch(root, start, end, idx)
    processor.create_json(root)
    loader.post_json_files(root)
예제 #4
0
def main():
    if len(sys.argv) < 3:
        utils.error('Requires a start and end date')
        _usage()
        exit()
    start = sys.argv[1]
    end = sys.argv[2]
    idx = None
    if len(sys.argv) == 4:
        try:
            idx = int(sys.argv[3])
        except ValueError:
            utils.error("Index argument must be an integer")
            sys.exit(1)
    root = os.path.dirname(os.path.realpath(__file__))
    getter.run_batch(root, start, end, idx)
    processor.create_json(root)
    loader.post_json_files(root)