def write_markdown_to_file(self, f):
    """Writes this index to file `f`.

    The output is formatted as an unordered list. Each list element
    contains the title of the library, followed by a list of symbols
    in that library hyperlinked to the corresponding anchor in that
    library.

    Args:
      f: The output file.
    """
    print("---", file=f)
    print("---", file=f)
    print("<!-- This file is machine generated: DO NOT EDIT! -->", file=f)
    print("", file=f)
    print("# TensorFlow Python reference documentation", file=f)
    print("", file=f)
    fullname_f = lambda name: self._members[name][0]
    anchor_f = lambda name: _get_anchor(self._module_to_name, fullname_f(name))

    for filename, library in self._filename_to_library_map:
      sorted_names = sorted(library.mentioned, key=lambda x: (str.lower(x), x))
      member_names = [n for n in sorted_names if n in self._members]
      # TODO: This is a hack that should be removed as soon as the website code
      # allows it.
      full_filename = self._path_prefix + filename
      links = ["[`%s`](%s#%s)" % (name, full_filename[:-3], anchor_f(name))
               for name in member_names]
      if links:
        print("* **[%s](%s)**:" % (library.title, full_filename[:-3]), file=f)
        for link in links:
          print("  * %s" % link, file=f)
        print("", file=f)
def write_markdown_to_file ( self , f ) : print ( "---" , file = f ) print ( "---" , file = f ) print ( "<!-- This file is machine generated: DO NOT EDIT! -->" , file = f ) print ( "" , file = f ) print ( "# TensorFlow Python reference documentation" , file = f ) print ( "" , file = f ) fullname_f = lambda name : self . _members [ name ] [ 0 ] anchor_f = lambda name : _get_anchor ( self . _module_to_name , fullname_f ( name ) ) for filename , library in self . _filename_to_library_map : sorted_names = sorted ( library . mentioned , key = lambda x : ( str . lower ( x ) , x ) ) member_names = [ n for n in sorted_names if n in self . _members ] full_filename = self . _path_prefix + filename links = [ "[`%s`](%s#%s)" % ( name , full_filename [ : - 3 ] , anchor_f ( name ) ) for name in member_names ] if links : print ( "* **[%s](%s)**:" % ( library . title , full_filename [ : - 3 ] ) , file = f ) for link in links : print ( "  * %s" % link , file = f ) print ( "" , file = f )
Writes this index to file `f`.

    The output is formatted as an unordered list. Each list element
    contains the title of the library, followed by a list of symbols
    in that library hyperlinked to the corresponding anchor in that
    library.

    Args:
      f: The output file.