parameters: (args)
return_statement: return options
docstring: Parses command line options.
  
    Returns:
      An options object as from argparse.ArgumentParser.parse_args()
docstring_summary: Parses command line options.
docstring_tokens: Parses command line options .
function: def _ParseArgs(args):
    """Parses command line options.
  
    Returns:
      An options object as from argparse.ArgumentParser.parse_args()
    """
    parser = argparse.ArgumentParser(description=__doc__)
    build_utils.AddDepfileOption(parser)
  
    parser.add_argument('--res-sources-path',
                        required=True,
                        help='Path to a list of input resources for this target.')
  
    parser.add_argument(
        '--r-text-in',
        help='Path to pre-existing R.txt. Its resource IDs override those found '
        'in the generated R.txt when generating R.java.')
  
    parser.add_argument(
        '--allow-missing-resources',
        action='store_true',
        help='Do not fail if some resources exist in the res/ dir but are not '
        'listed in the sources.')
  
    parser.add_argument(
        '--resource-zip-out',
        help='Path to a zip archive containing all resources from '
        '--resource-dirs, merged into a single directory tree.')
  
    parser.add_argument('--r-text-out',
                        help='Path to store the generated R.txt file.')
  
    parser.add_argument('--strip-drawables',
                        action="store_true",
                        help='Remove drawables from the resources.')
  
    options = parser.parse_args(args)
  
    with open(options.res_sources_path) as f:
      options.sources = f.read().splitlines()
    options.resource_dirs = resource_utils.DeduceResourceDirsFromFileList(
        options.sources)
  
    return options
function_tokens: def _ParseArgs ( args ) : parser = argparse . ArgumentParser ( description = __doc__ ) build_utils . AddDepfileOption ( parser ) parser . add_argument ( '--res-sources-path' , required = True , help = 'Path to a list of input resources for this target.' ) parser . add_argument ( '--r-text-in' , help = 'Path to pre-existing R.txt. Its resource IDs override those found ' 'in the generated R.txt when generating R.java.' ) parser . add_argument ( '--allow-missing-resources' , action = 'store_true' , help = 'Do not fail if some resources exist in the res/ dir but are not ' 'listed in the sources.' ) parser . add_argument ( '--resource-zip-out' , help = 'Path to a zip archive containing all resources from ' '--resource-dirs, merged into a single directory tree.' ) parser . add_argument ( '--r-text-out' , help = 'Path to store the generated R.txt file.' ) parser . add_argument ( '--strip-drawables' , action = "store_true" , help = 'Remove drawables from the resources.' ) options = parser . parse_args ( args ) with open ( options . res_sources_path ) as f : options . sources = f . read ( ) . splitlines ( ) options . resource_dirs = resource_utils . DeduceResourceDirsFromFileList ( options . sources ) return options