This will be called if the script is directly invoked.
()
| 83 | |
| 84 | |
| 85 | def main(): |
| 86 | """ |
| 87 | This will be called if the script is directly invoked. |
| 88 | """ |
| 89 | parser = get_parser() |
| 90 | args = parser.parse_args() |
| 91 | |
| 92 | work_dir = args.work_dir |
| 93 | old_ext = args.old_ext if args.old_ext.startswith(".") else "." + args.old_ext |
| 94 | new_ext = args.new_ext if args.new_ext.startswith(".") else "." + args.new_ext |
| 95 | |
| 96 | batch_rename(work_dir, old_ext, new_ext, dry_run=args.dry_run) |
| 97 | |
| 98 | |
| 99 | if __name__ == "__main__": |
no test coverage detected