MCPcopy Create free account
hub / github.com/geekcomputers/Python / main

Function main

batch_file_rename.py:85–96  ·  view source on GitHub ↗

This will be called if the script is directly invoked.

()

Source from the content-addressed store, hash-verified

83
84
85def 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
99if __name__ == "__main__":

Callers 1

Calls 2

get_parserFunction · 0.85
batch_renameFunction · 0.85

Tested by

no test coverage detected