code: def traits(args):
      
      p = OptionParser(traits.__doc__)
      opts, args = p.parse_args(args)
  
      if len(args) < 1:
          sys.exit(not p.print_help())
  
      samples = []
      for folder in args:
          targets = iglob(folder, "*-traits.json")
          if not targets:
              continue
          filename = targets[0]
          js = json.load(open(filename))
          js["skin_rgb"] = make_rgb(
              js["traits"]["skin-color"]["L"],
              js["traits"]["skin-color"]["A"],
              js["traits"]["skin-color"]["B"])
          js["eye_rgb"] = make_rgb(
              js["traits"]["eye-color"]["L"],
              js["traits"]["eye-color"]["A"],
              js["traits"]["eye-color"]["B"])
          samples.append(js)
  
      template = Template(traits_template)
      fw = open("report.html", "w")
      print(template.render(samples=samples), file=fw)
      logging.debug("Report written to `{}`".format(fw.name))
      fw.close()
docs: %prog traits directory
  
      Make HTML page that reports eye and skin color.