#NEWLINE# def create_sitemap( app , exception ) : #NEWLINE# #INDENT# ' Generates the ``sitemap.txt`` from the collected HTML page links.\n\n    ' #NEWLINE# filename = ( exception . outdir + '/sitemap.txt' ) #NEWLINE# print ( ( 'Generating sitemap.txt in %s' % filename ) ) #NEWLINE# with open ( filename , 'w' ) as f : #NEWLINE# #INDENT# for link in app . sitemap_links : #NEWLINE# #INDENT# f . write ( link ) #NEWLINE# f . write ( '\n' )