aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TODO8
-rw-r--r--reconcile.py19
2 files changed, 22 insertions, 5 deletions
diff --git a/TODO b/TODO
index 914e61a..e79f6e0 100644
--- a/TODO
+++ b/TODO
@@ -29,10 +29,10 @@ Next:
- Look for urls in wherepublished.
- Forgive newlines in wherepublished, note.
D "Systems, Zero Knowledge"?
- - Make CSS and HTML pass the validator
+ o Make CSS and HTML pass the validators
o When sorting by author, make "Paul F. Syverson" the same person
as "Paul Syverson" unless somebody says different.
- - When sorting within a year
-What the heck is the algorithm for sorting within a year,
- when sorting by date? What should it be?
+ - When sorting by date, entries with unknown months go into a magic
+ "month zero" before January. Is this right?
+
diff --git a/reconcile.py b/reconcile.py
index 8228528..88e1209 100644
--- a/reconcile.py
+++ b/reconcile.py
@@ -171,7 +171,24 @@ class MasterBibTeX(BibTeX.BibTeX):
for g, m in matches:
print "%%%% goodness", g
print m
-
+
+
+def noteToURL(note):
+ " returns tp, url "
+ note = note.replace("\n", " ")
+ m = re.match(r'\s*(?:\\newline\s*)*\s*\\url{(.*)}\s*(?:\\newline\s*)*',
+ note)
+ if not m:
+ return None
+ url = m.group(1)
+ for suffix, tp in ((".html", "html"),
+ (".ps", "ps"),
+ (".ps.gz", "ps_gz"),
+ (".pdf", "pdf"),
+ (".txt", "txt")):
+ if url.endswith(suffix):
+ return tp,url
+ return "???", url
all_ok = 1
def emit(f,ent):