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)
Beispiel #2
0
def main():
    root = os.path.dirname(os.path.realpath(__file__))
    try:
        safe_mkdir(os.path.join(root, 'downloaded_data/archive'))
        safe_mkdir(os.path.join(root, 'json_data/archive'))
        log_dir = os.path.join(root, 'logs')
        safe_mkdir(log_dir)
        log_file = open(os.path.join(log_dir, "ion7350interface.log"), 'a+')
        log_file.close()
        make_creds_file(root)
    except ValueError as err:
        utils.error(str(err))
    except IOError as ierr:
        utils.error(str(ierr))
Beispiel #3
0
def main():
    root = os.path.dirname(os.path.realpath(__file__))
    try:
        safe_mkdir(os.path.join(root, 'downloaded_data/archive'))
        safe_mkdir(os.path.join(root, 'json_data/archive'))
        log_dir = os.path.join(root, 'logs')
        safe_mkdir(log_dir)
        log_file = open(os.path.join(log_dir, "ion7350interface.log"), 'a+')
        log_file.close()
        make_creds_file(root)
    except ValueError as err:
        utils.error(str(err))
    except IOError as ierr:
        utils.error(str(ierr))
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)
Beispiel #5
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)
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)