diff -r f8c468367dab -r 68792fb2870f scripts/bib2dox.py --- a/scripts/bib2dox.py Sat Sep 26 10:15:49 2009 +0200 +++ b/scripts/bib2dox.py Fri Oct 02 17:03:43 2009 +0200 @@ -86,6 +86,10 @@ url_rex = re.compile('\\\url\{([^}]*)\}') +# +# styles for html formatting +# +divstyle = 'margin-top: -4ex; margin-left: 8em;' # # return the string parameter without braces @@ -284,7 +288,7 @@ entry = [] entrytype = pubtype_rex.sub('\g<1>',line) entrytype = string.lower(entrytype) - # entryid = pubtype_rex.sub('\g<2>', line) + entryid = pubtype_rex.sub('\g<2>', line) # end entry if just a } elif endtype_rex.match(line): @@ -379,6 +383,7 @@ bibkey = entrycont['key'] entry.insert(0, sortkey) entry.insert(1, bibkey) + entry.insert(2, entryid) # add the entry to the file contents filecont.append(entry) @@ -439,6 +444,7 @@ for entry in filecont: # generate output key form the bibtex key bibkey = entry[1] + entryid = entry[2] if keytable[bibkey] == 1: outkey = bibkey else: @@ -446,13 +452,11 @@ counttable[bibkey] += 1 # append the entry code to the output - file.append('\n' + \ - '[' + outkey + ']') - file.append('') - file.append('\\anchor ' + outkey) - for line in entry[2:]: + file.append('\\section ' + entryid + ' [' + outkey + ']') + file.append('
') + for line in entry[3:]: file.append(line) - file.append('\n') + file.append('
') file.append('') return file @@ -780,12 +784,8 @@ print '/**' print '\page references References' print - print '' - print for line in outdata: print line - print '
' - print print '*/'