def main():
    logging.basicConfig(level=logging.INFO, format='%(name)-20s  %(levelname)-8s  %(message)s')
    parser = ArgumentParser()
    parser.add_argument('-c', '--config', required=True, help='Path to config file')
    parser.add_argument('-t', '--topic', required=True, help='Topic name')
    parser.add_argument('--since', help='Skip objects that are older than given timestamp')
    args = parser.parse_args()
    with open(args.config) as fh:
        restore_config = json.load(fh)
    if args.since:
        dt = dateutil.parser.parse(args.since)
        if (dt.tzinfo is None):
            dt = dt.replace(tzinfo=datetime.timezone.utc)
        restore_config['since'] = dt
    kafka_restore = KafkaRestore(config=restore_config)
    kafka_restore.restore(topic=args.topic)
def main():
    logging.basicConfig(level=logging.INFO, format='%(name)-20s  %(levelname)-8s  %(message)s')
    parser = ArgumentParser()
    parser.add_argument('-c', '--config', required=True, help='Path to config file')
    parser.add_argument('-t', '--topic', required=True, help='Topic name')
    parser.add_argument('--since', help='Skip objects that are older than given timestamp')
    args = parser.parse_args()
    with open(args.config) as fh:
        restore_config = json.load(fh)
    if args.since:
        dt = dateutil.parser.parse(args.since)
        if (dt.tzinfo is None):
            dt = dt.replace(tzinfo=datetime.timezone.utc)
        restore_config['since'] = dt
    kafka_restore = KafkaRestore(config=restore_config)
    kafka_restore.restore(topic=args.topic)