Author: bugman Date: Tue Dec 15 12:01:21 2015 New Revision: 28150 URL: http://svn.gna.org/viewcvs/relax?rev=28150&view=rev Log: The replicate title finding script now processes short titles as well.
This shows that the Frame_order.html file will be conflicting and overwritten. Modified: trunk/docs/latex/find_replicate_titles.py Modified: trunk/docs/latex/find_replicate_titles.py URL: http://svn.gna.org/viewcvs/relax/trunk/docs/latex/find_replicate_titles.py?rev=28150&r1=28149&r2=28150&view=diff ============================================================================== --- trunk/docs/latex/find_replicate_titles.py (original) +++ trunk/docs/latex/find_replicate_titles.py Tue Dec 15 12:01:21 2015 @@ -67,7 +67,7 @@ # Loop over the file contents. for line in lines: # Skip everything that is not a chapter or section. - if not (search("\\\\chapter{", line) or search("\\\\section{", line) or search("\\\\subsection{", line)): + if not (search("\\\\chapter", line) or search("\\\\section", line) or search("\\\\subsection", line)): continue # Strip off the newline character. @@ -77,8 +77,13 @@ if search(' \\\\label', line): line = line[:line.index(' \label')] - # Extract the title string by finding the first '{' and chop off the final '}'. - title = line[line.index('{')+1:-1] + # Extract the short title string, if it exists. + if '[' in line: + title = line[line.index('[')+1:line.index(']')] + + # Extract the full title string by finding the first '{' and chop off the final '}'. + else: + title = line[line.index('{')+1:-1] # Is the title new? if not title in self.titles: _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits