diff --git a/debian/patches/correct_name b/debian/patches/correct_name new file mode 100644 index 0000000..a517c09 --- /dev/null +++ b/debian/patches/correct_name @@ -0,0 +1,51 @@ +From: Michael R. Crusoe +Subject: unify script name reporting +--- ctdconverter.orig/convert.py ++++ ctdconverter/convert.py +@@ -17,10 +17,11 @@ + program_version_message = '%%(prog)s %s (%s)' % (program_version, program_build_date) + program_short_description = "CTDConverter - A project from the WorkflowConversion family " \ + "(https://github.com/WorkflowConversion/CTDConverter)" ++program_name = os.path.basename(sys.argv[0]) + program_usage = ''' + USAGE: + +- $ python convert.py [FORMAT] [ARGUMENTS ...] ++ $ {name} [FORMAT] [ARGUMENTS ...] + + FORMAT can be either one of the supported output formats: cwl, galaxy. + +@@ -30,12 +31,12 @@ + + I - Parsing a single CTD file and convert it: + +- $ python convert.py [FORMAT] -i [INPUT_FILE] -o [OUTPUT_FILE] ++ $ {name} [FORMAT] -i [INPUT_FILE] -o [OUTPUT_FILE] + + + II - Parsing several CTD files, output converted wrappers in a given folder: + +- $ python converter.py [FORMAT] -i [INPUT_FILES] -o [OUTPUT_DIRECTORY] ++ $ {name} [FORMAT] -i [INPUT_FILES] -o [OUTPUT_DIRECTORY] + + + III - Hardcoding parameters +@@ -141,7 +142,7 @@ + + There are, for now, no CWL-specific parameters or options. + +-''' ++'''.format(name=program_name) + + program_license = '''%(short_description)s + +@@ -174,7 +175,8 @@ + # converter will register its own parameters after we've registered the basic ones... we have to do it old school + if len(argv) < 2: + utils.error("Not enough arguments provided") +- print("\nUsage: $ python convert.py [TARGET] [ARGUMENTS]\n\n" + ++ print("\nUsage: $ {} [TARGET] " ++ " [ARGUMENTS]\n\n".format(program_name) + + "Where:\n" + + " target: one of 'cwl' or 'galaxy'\n\n" + + "Run again using the -h/--help option to print more detailed help.\n") diff --git a/debian/patches/series b/debian/patches/series index 8b00858..94f50c9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ add_setup.py.patch upgrade_deprecated_strip +correct_name