Skip to content

Commit

Permalink
support python -m pretext, fix --silent/--verbose options
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenClontz committed Jun 2, 2021
1 parent d29c2d4 commit 5ad7176
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pretext/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .cli import main

if __name__ == "__main__":
main()
4 changes: 2 additions & 2 deletions pretext/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def raise_cli_error(message):
# Click command-line interface
@click.group()
# Allow a verbosity command:
@click.option('--silent', count=True, help="suppress basic feedback")
@click.option('--verbose', count=True, help="show debug info")
@click.option('--silent', is_flag=True, help="suppress basic feedback")
@click.option('--verbose', is_flag=True, help="show debug info")
@click.version_option(cli_version(),message=cli_version())
# @click_config_file.configuration_option()
def main(silent,verbose):
Expand Down

0 comments on commit 5ad7176

Please sign in to comment.