Skip to content

Commit

Permalink
docs: added new commandline argument '--quiet' to python script
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed May 22, 2019
1 parent 5a34bc3 commit 621938d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/manuals/Makefile
Expand Up @@ -20,7 +20,7 @@ AUTOGENERATED_RESOURCE_DESCRIPTION_JSON_FILES = autogenerated/bareos-dir-config-
autogenerated/bconsole-config-schema.json \
autogenerated/bareos-tray-monitor-config-schema.json

GENERATE_RESOURCE_DESCRIPTIONS_FROM_JSON_FILES=./scripts/generate-resoure-descriptions.py --sphinx
GENERATE_RESOURCE_DESCRIPTIONS_FROM_JSON_FILES=./scripts/generate-resoure-descriptions.py --sphinx --quiet

# You can set these variables from the command line.
SPHINXOPTS =
Expand Down
4 changes: 4 additions & 0 deletions docs/manuals/scripts/generate-resoure-descriptions.py
Expand Up @@ -563,6 +563,7 @@ def createSphinx(data):
logger = logging.getLogger()

parser = argparse.ArgumentParser()
parser.add_argument('-q', '--quiet', action='store_true', help="suppress logging output" )
parser.add_argument('-d', '--debug', action='store_true', help="enable debugging output" )
parser.add_argument('--latex', action='store_true', help="Create LaTex files." )
parser.add_argument('--sphinx', action='store_true', help="Create RST files for Sphinx." )
Expand All @@ -571,6 +572,9 @@ def createSphinx(data):
if args.debug:
logger.setLevel(logging.DEBUG)

if args.quiet:
logger.setLevel(logging.CRITICAL)

with open(args.filename) as data_file:
data = json.load(data_file)
#pprint(data)
Expand Down

0 comments on commit 621938d

Please sign in to comment.