docs: def gen_scripts(
      file_name, file_name_ext, obj_name, obj_ext_name, output, output_ext,
      field=1, notexplicit=None, ascii_props=False, append=False, prefix=""
  ):
      """Generate `script` property."""
  
      obj = {}
      obj2 = {}
      aliases = {}
      with codecs.open(os.path.join(HOME, 'unicodedata', UNIVERSION, 'PropertyValueAliases.txt'), 'r', 'utf-8') as uf:
          for line in uf:
              if line.startswith('sc ;'):
                  values = line.split(';')
                  aliases[format_name(values[1].strip())] = format_name(values[2].strip())
  
      with codecs.open(os.path.join(HOME, 'unicodedata', UNIVERSION, file_name_ext), 'r', 'utf-8') as uf:
          for line in uf:
              if not line.startswith('#'):
                  data = line.split('#')[0].split(';')
                  if len(data) < 2:
                      continue
                  exts = [aliases[format_name(n)] for n in data[1].strip().split(' ')]
                  span = create_span([int(i, 16) for i in data[0].strip().split('..')], is_bytes=ascii_props)
                  for ext in exts:
                      if ext not in obj2:
                          obj2[ext] = []
                      if span is None:
                          continue
  
                      obj2[ext].extend(span)
  
      with codecs.open(os.path.join(HOME, 'unicodedata', UNIVERSION, file_name), 'r', 'utf-8') as uf:
          for line in uf:
              if not line.startswith('#'):
                  data = line.split('#')[0].split(';')
                  if len(data) < 2:
                      continue
                  span = create_span([int(i, 16) for i in data[0].strip().split('..')], is_bytes=ascii_props)
                  name = format_name(data[1])
                  if name not in obj:
                      obj[name] = []
                  if name not in obj2:
                      obj2[name] = []
  
                  if span is None:
                      continue
  
                  obj[name].extend(span)
                  obj2[name].extend(span)
  
      for name in list(obj.keys()):
          s = set(obj[name])
          obj[name] = sorted(s)
  
      for name in list(obj2.keys()):
          s = set(obj2[name])
          obj2[name] = sorted(s)
  
      if notexplicit:
          not_explicitly_defined(obj, notexplicit, is_bytes=ascii_props)
          not_explicitly_defined(obj2, notexplicit, is_bytes=ascii_props)
  
      # Convert characters values to ranges
      char2range(obj, is_bytes=ascii_props)
      char2range(obj2, is_bytes=ascii_props)
  
      with codecs.open(output, 'a' if append else 'w', 'utf-8') as f:
          if not append:
              f.write(HEADER)
          # Write out the Unicode properties
          f.write('%s_%s = {\n' % (prefix, obj_name))
          count = len(obj) - 1
          i = 0
          for k1, v1 in sorted(obj.items()):
              f.write('    "%s": "%s"' % (k1, v1))
              if i == count:
                  f.write('\n}\n')
              else:
                  f.write(',\n')
              i += 1
  
      with codecs.open(output_ext, 'a' if append else 'w', 'utf-8') as f:
          if not append:
              f.write(HEADER)
          # Write out the Unicode properties
          f.write('%s_%s = {\n' % (prefix, obj_ext_name))
          count = len(obj2) - 1
          i = 0
          for k1, v1 in sorted(obj2.items()):
              f.write('    "%s": "%s"' % (k1, v1))
              if i == count:
                  f.write('\n}\n')
              else:
                  f.write(',\n')
              i += 1