diff options
| author | Nick Mathewson <nickm@torproject.org> | 2003-05-21 18:43:36 +0000 |
|---|---|---|
| committer | Nick Mathewson <nickm@torproject.org> | 2003-05-21 18:43:36 +0000 |
| commit | beb61b16d4947fca7801c2e0077b3a2e944c2023 (patch) | |
| tree | 4e1fe5c04b77469cc9359a4b3a8feb58e3842cbf | |
| parent | cf63ed4edebe9803a982255d4b440d18d4ee3f54 (diff) | |
| download | anonbib-beb61b16d4947fca7801c2e0077b3a2e944c2023.tar.gz | |
Fix a couple of bugs
svn:r24
| -rw-r--r-- | BibTeX.py | 2 | ||||
| -rw-r--r-- | TODO | 4 | ||||
| -rw-r--r-- | reconcile.py | 4 | ||||
| -rw-r--r-- | writeHTML.py | 10 |
4 files changed, 12 insertions, 8 deletions
@@ -106,6 +106,7 @@ def splitEntriesByAuthor(entries): for ent in entries: for a in ent.parsedAuthor: sortkey = txtize(" ".join(a.von+a.last+a.first+a.jr)) + url = author_url(" ".join(a.first+a.von+a.last+a.jr)) secname = " ".join(a.last) more = a.first+a.von if more: @@ -113,7 +114,6 @@ def splitEntriesByAuthor(entries): if a.jr: secname += ", "+" ".join(a.jr) secname = htmlize(secname) - url = author_url(secname) if url: url_map[secname] = url @@ -19,3 +19,7 @@ First usable python version: o "Important" note. o Remarks +Next: + - Know about @book + - Maybe uncrossref in tmp.bib + - Maybe pull important papers to the start of their sections? diff --git a/reconcile.py b/reconcile.py index fae4be6..8228528 100644 --- a/reconcile.py +++ b/reconcile.py @@ -3,7 +3,7 @@ import sys import re -assert sys.version[:3] >= (2,2,0) +assert sys.version_info[:3] >= (2,2,0) import BibTeX import config @@ -230,7 +230,7 @@ print "========= Scanning new file ========" try: fn = sys.argv[1] input = BibTeX.parseFile(fn) -except BibTex.ParseError, e: +except BibTeX.ParseError, e: print "Error parsing %s: %s"%(fn,e) sys.exit(1) diff --git a/writeHTML.py b/writeHTML.py index ceb14e4..019795f 100644 --- a/writeHTML.py +++ b/writeHTML.py @@ -4,7 +4,7 @@ import sys import re import os -assert sys.version[:3] >= (2,2,0) +assert sys.version_info[:3] >= (2,2,0) import BibTeX import config @@ -22,14 +22,14 @@ def writeBody(f, sections, section_urls): section_urls: map from sectionname to external url''' for s, entries in sections: u = section_urls.get(s) - s = re.sub(r'\s+', ' ', s.strip()) - s = s.replace(" ", " ") + sDisp = re.sub(r'\s+', ' ', s.strip()) + sDisp = sDisp.replace(" ", " ") if u: print >>f, ('<h3><a name="%s"><a href="%s">%s</a></a></h3>'%( - (BibTeX.url_untranslate(s), u, s))) + (BibTeX.url_untranslate(s), u, sDisp))) else: print >>f, ('<h3><a name="%s">%s</a></h3>'%( - BibTeX.url_untranslate(s),s)) + BibTeX.url_untranslate(s),sDisp)) print >>f, "<ul class='expand'>" for e in entries: print >>f, e.to_html() |
