Updated help menu to be more consistent

This commit is contained in:
Harrison Deng 2023-04-25 09:30:57 -05:00
parent 7bab8a9436
commit f4d9c37687
2 changed files with 9 additions and 9 deletions

View File

@ -54,7 +54,7 @@ def rename(
logging.warning( logging.warning(
'Group "%s" was not matched to any row in the provided CSV. ' 'Group "%s" was not matched to any row in the provided CSV. '
"Skipping...", "Skipping...",
match.group(1) match.group(1),
) )
continue continue
original = subitem_path original = subitem_path
@ -87,31 +87,31 @@ def run(args):
def main(): def main():
program_name = "renamebycsv" program_name = "renamebycsv"
argparser = argparse.ArgumentParser( argparser = argparse.ArgumentParser(
program_name, "Rename all files by using a CSV as a dictionary." program_name, description="Rename all files by using a CSV as a dictionary."
) )
argparser.add_argument( argparser.add_argument(
"input_dir", "input_dir",
help="The directory containing the items that is to be renamed.", help="The directory containing the items that is to be renamed",
metavar="I", metavar="I",
) )
argparser.add_argument( argparser.add_argument(
"regex", "regex",
help="The regex to apply to each file name. The first capture group is used to " help="The regex to apply to each file name. The first capture group is used to "
"perform the replacement.", "perform the replacement",
metavar="R", metavar="R",
) )
argparser.add_argument( argparser.add_argument(
"csv", "csv",
help="The CSV to use as the dictionary for the substitutions in file name.", help="The CSV to use as the dictionary for the substitutions in file name",
metavar="C", metavar="C",
) )
argparser.add_argument( argparser.add_argument(
"current", "current",
help="The column header to look for the text matched by the regex.", help="The column header to look for the text matched by the regex",
metavar="F", metavar="F",
) )
argparser.add_argument( argparser.add_argument(
"become", help="The column header to replace the regex match.", metavar="T" "become", help="The column header to replace the regex match", metavar="T"
) )
argparser.add_argument( argparser.add_argument(
"-r", "-r",
@ -140,7 +140,7 @@ def main():
"-k", "-k",
"--keep-extension", "--keep-extension",
help="Keeps the original file's extension by appending it to the end of the " help="Keeps the original file's extension by appending it to the end of the "
"name defined by the CSV.", "name defined by the CSV",
action="store_true", action="store_true",
) )

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = renamebycsv name = renamebycsv
version = 0.0.4 version = 0.0.5
[options] [options]
packages = renamebycsv packages = renamebycsv