Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archive: Add --quiet option #129

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions beangulp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _walk(file_or_dirs, log):
@click.option('--failfast', '-x', is_flag=True,
help='Stop processing at the first error.')
@click.option('--quiet', '-q', count=True,
help="Suppress all output.")
help='Suppress all output.')
@click.pass_obj
def _extract(ctx, src, output, existing, reverse, failfast, quiet):
"""Extract transactions from documents.
Expand Down Expand Up @@ -122,8 +122,10 @@ def _extract(ctx, src, output, existing, reverse, failfast, quiet):
help='Just print where the files would be moved.')
@click.option('--failfast', '-x', is_flag=True,
help='Stop processing at the first error.')
@click.option('--quiet', '-q', count=True,
help='Suppress all output.')
@click.pass_obj
def _archive(ctx, src, destination, dry_run, overwrite, failfast):
def _archive(ctx, src, destination, dry_run, overwrite, failfast, quiet):
"""Archive documents.

Walk the SRC list of files or directories and move each file
Expand All @@ -147,7 +149,8 @@ def _archive(ctx, src, destination, dry_run, overwrite, failfast):
import __main__
destination = os.path.dirname(os.path.abspath(__main__.__file__))

log = utils.logger()
verbosity = -quiet
log = utils.logger(verbosity, err=True)
errors = exceptions.ExceptionsTrap(log)
renames = []

Expand Down
Loading