From: Reinhold Kainhofer Date: Tue, 5 Aug 2008 20:53:55 +0000 (+0200) Subject: texi2html: Don't generate map entry for Top X-Git-Tag: release/2.11.58-1~32^2~85 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=45ab124f6b13824769379c4bf9111289d2527c85;p=lilypond.git texi2html: Don't generate map entry for Top --- diff --git a/buildscripts/extract_texi_filenames.py b/buildscripts/extract_texi_filenames.py index 18c10bce9a..e8334f34e6 100755 --- a/buildscripts/extract_texi_filenames.py +++ b/buildscripts/extract_texi_filenames.py @@ -89,7 +89,7 @@ def texinfo_file_name(title): else: result += "__%06x" % ccode # 7: if name begins with number, prepend 't_g' (so it starts with a letter) - if ord(result[0]) in range (ord('0'), ord('9')): + if (result != '') and (ord(result[0]) in range (ord('0'), ord('9'))): result = 't_g' + result return result @@ -115,9 +115,9 @@ def process_sections (filename, page): for sec in sections: if sec[0] == "node": # Write out the cached values to the file and start a new section: - if this_title != '': - f.write (this_title + "\t" + this_filename + "\t" + this_anchor + "\n") - had_section = False + if this_title != '' and this_title != 'Top': + f.write (this_title + "\t" + this_filename + "\t" + this_anchor + "\n") + had_section = False this_title = remove_texinfo (sec[1]) this_anchor = create_texinfo_anchor (sec[1]) elif sec[0] == "translationof": @@ -145,7 +145,7 @@ def process_sections (filename, page): if not this_unnumbered or sec[0] == "unnumbered": this_filename = this_anchor - if this_title != '': + if this_title != '' and this_title != 'Top': f.write (this_title + "\t" + this_filename + "\t" + this_anchor + "\n") f.close ()