Skip to content

Commit

Permalink
hide extra_logging flag from arguments help - it is only for testing …
Browse files Browse the repository at this point in the history
…(or troubles)
  • Loading branch information
niradar committed May 28, 2024
1 parent fdf9df3 commit 62491fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ python df_finder3.py --src <source_folder> --target <target_folder> --move_to <m
### Options

- `--run`: Run without test mode (default is test mode).
- `--extra_logging`: Enable extra logging (default is disabled).
- `--ignore_diff`: Comma-separated list of differences to ignore: `mdate`, `filename`, `checkall` (default is `mdate`).
- `--copy_to_all`: Copy file to all folders if found in multiple target folders (default is to move file to the first folder).
- `--delete_empty_folders`: Delete empty folders in the source folder (default is enabled).
Expand Down
13 changes: 7 additions & 6 deletions df_finder3.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,21 +258,22 @@ def parse_arguments(cust_args=None):
description="Identify duplicate files between source and target folders, move duplicates to a separate folder.")
parser.add_argument('--src', '--source', required=True, help='Source folder')
parser.add_argument('--target', required=True, help='Target folder')
parser.add_argument('--move_to', '--to', required=True, type=str, help='Folder where the duplicates will be moved.')
parser.add_argument('--move_to', '--to', required=True, type=str, help='Folder where the duplicates '
'will be moved.')
parser.add_argument('--run', action='store_true', help='Run without test mode. Default is test mode.')
parser.add_argument('--extra_logging', action='store_true', help='Enable extra logging. Default is disabled.')
parser.add_argument('--ignore_diff', type=str,
help='Comma-separated list of differences to ignore: mdate, filename, checkall. Default is ignore mdate.',
parser.add_argument('--ignore_diff', type=str, help='Comma-separated list of differences to ignore: '
'mdate, filename, checkall. Default is ignore mdate.',
default='mdate')
parser.add_argument('--copy_to_all', action='store_true',
help='Copy file to all folders if found in multiple target folders. Default is move file to the first folder.',
default=False)
help='Copy file to all folders if found in multiple target folders. Default is move file to the'
' first folder.', default=False)
parser.add_argument('--delete_empty_folders', dest='delete_empty_folders', action='store_true',
help='Delete empty folders in the source folder. Default is enabled.')
parser.add_argument('--no-delete_empty_folders', dest='delete_empty_folders', action='store_false',
help='Do not delete empty folders in the source folder.')
parser.set_defaults(delete_empty_folders=True)
parser.add_argument('--clear_cache', action='store_true', help=argparse.SUPPRESS)
parser.add_argument('--extra_logging', action='store_true', help=argparse.SUPPRESS) # for testing
args = parser.parse_args(cust_args if cust_args else None)

if args.extra_logging:
Expand Down

0 comments on commit 62491fd

Please sign in to comment.