docs: def cli_create(argument_list):
      """
      command-line call to create a manifest from a JAR file or a
      directory
      """
  
      parser = argparse.ArgumentParser()
      parser.add_argument("content", help="file or directory")
      # TODO: shouldn't we always process directories recursively?
      parser.add_argument("-r", "--recursive",
                          help="process directories recursively")
      parser.add_argument("-i", "--ignore", nargs="+", action="append",
                          help="patterns to ignore "
                               "(can be given more than once)")
      parser.add_argument("-m", "--manifest", default=None,
                          help="output file (default is stdout)")
      parser.add_argument("-d", "--digest",
                          help="digest(s) to use, comma-separated")
  
      args = parser.parse_args(argument_list)
  
      # TODO: remove digest from here, they are created when signing!
      if args.digest is None:
          args.digest = "MD5,SHA1"
      requested_digests = args.digest.split(",")
      use_digests = [_get_digest(digest) for digest in requested_digests]
  
      if args.recursive:
          entries = multi_path_generator(args.content)
      else:
          entries = single_path_generator(args.content)
  
      mf = Manifest()
  
      ignores = ["META-INF/*"]
      if args.ignore:
          ignores.extend(*args.ignore)
  
      for name, chunks in entries:
          # skip the stuff that we were told to ignore
          if ignores and fnmatches(name, *ignores):
              continue
  
          sec = mf.create_section(name)
  
          digests = zip(requested_digests, digest_chunks(chunks(), use_digests))
          for digest_name, digest_value in digests:
              sec[digest_name + "-Digest"] = digest_value
  
      if args.manifest:
          # we'll output to the manifest file if specified, and we'll
          # even create parent directories for it, if necessary
          makedirsp(split(args.manifest)[0])
          output = open(args.manifest, "wb")
      else:
          output = sys.stdout
  
      mf.store(output)
  
      if args.manifest:
          output.close()