aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-05-21 18:43:36 +0000
committerNick Mathewson <nickm@torproject.org>2003-05-21 18:43:36 +0000
commitbeb61b16d4947fca7801c2e0077b3a2e944c2023 (patch)
tree4e1fe5c04b77469cc9359a4b3a8feb58e3842cbf
parentcf63ed4edebe9803a982255d4b440d18d4ee3f54 (diff)
downloadanonbib-beb61b16d4947fca7801c2e0077b3a2e944c2023.tar.gz
Fix a couple of bugs
svn:r24
-rw-r--r--BibTeX.py2
-rw-r--r--TODO4
-rw-r--r--reconcile.py4
-rw-r--r--writeHTML.py10
4 files changed, 12 insertions, 8 deletions
diff --git a/BibTeX.py b/BibTeX.py
index 74dd049..2e61453 100644
--- a/BibTeX.py
+++ b/BibTeX.py
@@ -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
diff --git a/TODO b/TODO
index f42683a..034bde8 100644
--- a/TODO
+++ b/TODO
@@ -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(" ", "&nbsp;")
+ sDisp = re.sub(r'\s+', ' ', s.strip())
+ sDisp = sDisp.replace(" ", "&nbsp;")
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()