parameters: ()
docstring: Processes input files and outputs results in specified format.
docstring_summary: Processes input files and outputs results in specified format.
docstring_tokens: Processes input files and outputs results in specified format .
function: def main():
    """Processes input files and outputs results in specified format.
    """
    # Argument parsing.
    parser = argparse.ArgumentParser(description=
        'Produce a table showing the translation status of each app by language.')
    parser.add_argument('--key_file', default='keys.json',
                        help='file with complete list of keys.')
    parser.add_argument('--output', default='text', choices=['text', 'html'],
                        help='output format')
    parser.add_argument('lang_files', nargs='+',
                        help='names of JSON files to examine')
    args = parser.parse_args()
  
    # Read in files, building up prefix counts.
    prefix_counts = {}  # A dictionary of dictionaries.
    prefix_counts[TOTAL] = get_prefix_counts(args.key_file)
    for lang_file in args.lang_files:
      prefix = get_prefix(lang_file)
      # Skip non-language files.
      if prefix not in ['qqq', 'keys']:
        prefix_counts[prefix] = get_prefix_counts(lang_file)
  
    # Output results.
    if args.output == 'text':
      output_as_text(prefix_counts)
    elif args.output == 'html':
      output_as_html(prefix_counts)
    else:
      print('No output?!')
function_tokens: def main ( ) : # Argument parsing. parser = argparse . ArgumentParser ( description = 'Produce a table showing the translation status of each app by language.' ) parser . add_argument ( '--key_file' , default = 'keys.json' , help = 'file with complete list of keys.' ) parser . add_argument ( '--output' , default = 'text' , choices = [ 'text' , 'html' ] , help = 'output format' ) parser . add_argument ( 'lang_files' , nargs = '+' , help = 'names of JSON files to examine' ) args = parser . parse_args ( ) # Read in files, building up prefix counts. prefix_counts = { } # A dictionary of dictionaries. prefix_counts [ TOTAL ] = get_prefix_counts ( args . key_file ) for lang_file in args . lang_files : prefix = get_prefix ( lang_file ) # Skip non-language files. if prefix not in [ 'qqq' , 'keys' ] : prefix_counts [ prefix ] = get_prefix_counts ( lang_file ) # Output results. if args . output == 'text' : output_as_text ( prefix_counts ) elif args . output == 'html' : output_as_html ( prefix_counts ) else : print ( 'No output?!' )