#!/usr/bin/env python

# Copyright (c) 2015 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the MIT License
# accompanying the software ("License").  This software is distributed "AS IS"
# as set forth in the License.

import sys
import logging

logging.basicConfig(filename='reschema-doc.log', level=logging.DEBUG)

from reschema.doc import ReschemaDoc, ReschemaDocException
import reschema.settings

reschema.settings.MARKED_LOAD = True
reschema.settings.LOAD_DESCRIPTIONS = True

if __name__ == '__main__':
    r = ReschemaDoc()
    try:
        r.parse_args(sys.argv[1:])
        r.run()
    except ReschemaDocException, e:
        print e.msg
        print ""
        r.parser.print_help()
        sys.exit(1)
