docs: def main():
      """
      Command-line processor. See ``--help`` for details.
      """
      main_only_quicksetup_rootlogger()
  
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "filenames",
          nargs="+",
          help="Names of CSV/TSV files to merge"
      )
      parser.add_argument(
          "--outfile",
          default="-",
          help="Specify an output filename. If omitted or '-', stdout is used.",
      )
      parser.add_argument(
          "--inputdialect",
          default="excel",
          help="The input files' CSV/TSV dialect. Default: %(default)s.",
          choices=csv.list_dialects(),
      )
      parser.add_argument(
          "--outputdialect",
          default="excel",
          help="The output file's CSV/TSV dialect. Default: %(default)s.",
          choices=csv.list_dialects(),
      )
      parser.add_argument(
          "--noheaders",
          action="store_true",
          help="By default, files are assumed to have column headers. "
               "Specify this option to assume no headers.",
      )
      parser.add_argument(
          "--debug",
          action="store_true",
          help="Verbose debugging output.",
      )
      progargs = parser.parse_args()
  
      kwargs = {
          "filenames": progargs.filenames,
          "input_dialect": progargs.inputdialect,
          "output_dialect": progargs.outputdialect,
          "debug": progargs.debug,
          "headers": not progargs.noheaders,
      }
      if progargs.outfile == '-':
          log.info("Writing to stdout")
          merge_csv(outfile=sys.stdout, **kwargs)
      else:
          log.info("Writing to " + repr(progargs.outfile))
          with open(progargs.outfile, 'w') as outfile:
              # noinspection PyTypeChecker
              merge_csv(outfile=outfile, **kwargs)