def main():
  parser = argparse.ArgumentParser()
  parser.add_argument('-b', '--base_root', help='root of directory tree, base for comparison '
                      '(default [fonts])', metavar='dir', default='[fonts]')
  parser.add_argument('-t', '--target_root', help='root of directory tree, target for comparison',
                      metavar='dir', required=True)
  parser.add_argument('--name', help='only examine files whose subpath+names contain this regex')
  parser.add_argument('--compare_size', help='include size in comparisons',
                      action='store_true')
  parser.add_argument('--removed',  help='list files not in target', action='store_true')
  parser.add_argument('--added', help='list files not in base', action='store_true')
  parser.add_argument('--identical', help='list files that are identical in base and target',
                      action='store_true')
  parser.add_argument('--nopaths', help='do not print root paths', action='store_false',
                      default=True, dest='show_paths')
  args = parser.parse_args()

  args.base_root = tool_utils.resolve_path(args.base_root)
  args.target_root = tool_utils.resolve_path(args.target_root)

  if not os.path.isdir(args.base_root):
    print 'base_root %s does not exist or is not a directory' % args.base_root
    return

  if not os.path.isdir(args.target_root):
    print 'target_root %s does not exist or is not a directory' % args.target_root
    return

  comparefn = tuple_compare if args.compare_size else tuple_compare_no_size

  compare_summary(args.base_root, args.target_root, args.name, comparefn,
                  args.added, args.removed, args.identical, args.show_paths)
dataset/ETHPy150Open googlei18n/nototools/nototools/compare_summary.py/main/original