Author: bugman Date: Fri Feb 6 11:28:30 2015 New Revision: 27590 URL: http://svn.gna.org/viewcvs/relax?rev=27590&view=rev Log: Modified the rehead.py to skip the base index.html file and to allow rerunning the script a 2nd time. Modified: website/api/rehead.py Modified: website/api/rehead.py URL: http://svn.gna.org/viewcvs/relax/website/api/rehead.py?rev=27590&r1=27589&r2=27590&view=diff ============================================================================== --- website/api/rehead.py (original) +++ website/api/rehead.py Fri Feb 6 11:28:30 2015 @@ -146,6 +146,10 @@ analytics = False self.short_head = False for line in self.file_lines: + # The base index.html file. + if search("<title>The relax API documentation</title>", line): + return + # Special Epydoc pages with captialised HEAD tags - skip these! if search("<HEAD>", line): return @@ -166,6 +170,10 @@ # Short headers. if index == 2 and line[:-1] == "</head>": + self.short_head = True + elif index == 3 and line[:-1] == " <!--Mobile device support-->": + self.short_head = True + elif index == 2 and line[:-1] == " <!--Google analytics JS-->": self.short_head = True # Check the line, skipping the title tag.