def process_all_json_files(version, build_dir=True):
 if build_dir:
  full_path = version.project.full_json_path(version.slug)
 else:
  full_path = version.project.get_production_media_path(type_='json', version_slug=version.slug, include_file=False)
 html_files = []
 for (root, dirs, files) in os.walk(full_path):
  for filename in fnmatch.filter(files, '*.fjson'):
   if (filename in ['search.fjson', 'genindex.fjson', 'py-modindex.fjson']):
    continue
   html_files.append(os.path.join(root, filename))
 page_list = []
 for filename in html_files:
  try:
   result = process_file(filename)
   if result:
    page_list.append(result)
  except:
   pass
 return page_list

def process_all_json_files ( version , build_dir = True ) : if build_dir : full_path = version . project . full_json_path ( version . slug ) else : full_path = version . project . get_production_media_path ( type_ = 'json' , version_slug = version . slug , include_file = False ) html_files = [ ] for ( root , dirs , files ) in os . walk ( full_path ) : for filename in fnmatch . filter ( files , '*.fjson' ) : if ( filename in [ 'search.fjson' , 'genindex.fjson' , 'py-modindex.fjson' ] ) : continue html_files . append ( os . path . join ( root , filename ) ) page_list = [ ] for filename in html_files : try : result = process_file ( filename ) if result : page_list . append ( result ) except : pass return page_list
return a list of pages to index .