# Path: cli.py
# def setup_logger(loglevel):
#     loglevel = LOGLEVELS.get(loglevel.upper())
#     if loglevel is None:
#         loglevel = LOGLEVELS['INFO']
#     logger = logging.getLogger()
#     logger.setLevel(loglevel)
#     formatter = logging.Formatter(DEFAULT_LOG_FORMAT)
#     console_handler = logging.StreamHandler(stream=sys.stdout)
#     console_handler.setLevel(loglevel)
#     console_handler.setFormatter(formatter)
#     logger.addHandler(console_handler)
# 
# Path: cli.py
# def add_logging_options(parser):
#     parser.add_argument(
#         '--loglevel',
#         help='Log level, one of INFO, ERROR, WARN, DEBUG or CRITICAL.',
#         default='INFO',
#     )
# 
# Path: cli.py
# CMD_LINE_DATE_FORMAT = '%Y-%m-%d'


import os
import sys
import json
import logging
import argparse
import urllib.parse as urlparse
import elasticsearch
import botocore
import boto3
from datetime import datetime
from datetime import timedelta
from cli import setup_logger
from cli import add_logging_options
from cli import CMD_LINE_DATE_FORMAT
from capitolweb.workers.crec_parser import CRECParser
from __future__ import print_function





MODS_KEY_TEMPLATE = 'crec/%Y/%m/%d/mods/mods.xml'


if __name__ == '__main__':
    logging.basicConfig(level=20,)
    parser = argparse.ArgumentParser()
    add_logging_options(parser)

# Path: cli.py
# def setup_logger(loglevel):
#     loglevel = LOGLEVELS.get(loglevel.upper())
#     if loglevel is None:
#         loglevel = LOGLEVELS['INFO']
#     logger = logging.getLogger()
#     logger.setLevel(loglevel)
#     formatter = logging.Formatter(DEFAULT_LOG_FORMAT)
#     console_handler = logging.StreamHandler(stream=sys.stdout)
#     console_handler.setLevel(loglevel)
#     console_handler.setFormatter(formatter)
#     logger.addHandler(console_handler)
# 
# Path: cli.py
# def add_logging_options(parser):
#     parser.add_argument(
#         '--loglevel',
#         help='Log level, one of INFO, ERROR, WARN, DEBUG or CRITICAL.',
#         default='INFO',
#     )
# 
# Path: cli.py
# CMD_LINE_DATE_FORMAT = '%Y-%m-%d'


# Path: run_crec_es_uploader.py
import os
import sys
import json
import logging
import argparse
import urllib.parse as urlparse
import elasticsearch
import botocore
import boto3
from datetime import datetime
from datetime import timedelta
from cli import setup_logger
from cli import add_logging_options
from cli import CMD_LINE_DATE_FORMAT
from capitolweb.workers.crec_parser import CRECParser

from __future__ import print_function





MODS_KEY_TEMPLATE = 'crec/%Y/%m/%d/mods/mods.xml'


if __name__ == '__main__':
    logging.basicConfig(level=20,)
    parser = argparse.ArgumentParser()
    add_logging_options(parser)

    output_option_group = parser.add_mutually_exclusive_group(required=True)