aboutsummaryrefslogtreecommitdiffstats
path: root/reconcile.py
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-05-23 02:44:18 +0000
committerNick Mathewson <nickm@torproject.org>2003-05-23 02:44:18 +0000
commit9f98a5610bfe7b40d9ffe751dbf87a851d823f29 (patch)
treeaeec3e5acc8847435d2e83ac054c0bdbe0845e3b /reconcile.py
parenta5d4c56336ec216006fe830f630b7de5dde5c67a (diff)
downloadanonbib-9f98a5610bfe7b40d9ffe751dbf87a851d823f29.tar.gz
better TODO
svn:r31
Diffstat (limited to 'reconcile.py')
-rw-r--r--reconcile.py19
1 files changed, 18 insertions, 1 deletions
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):