diff options
| author | Nick Mathewson <nickm@torproject.org> | 2003-05-23 02:44:18 +0000 |
|---|---|---|
| committer | Nick Mathewson <nickm@torproject.org> | 2003-05-23 02:44:18 +0000 |
| commit | 9f98a5610bfe7b40d9ffe751dbf87a851d823f29 (patch) | |
| tree | aeec3e5acc8847435d2e83ac054c0bdbe0845e3b /reconcile.py | |
| parent | a5d4c56336ec216006fe830f630b7de5dde5c67a (diff) | |
| download | anonbib-9f98a5610bfe7b40d9ffe751dbf87a851d823f29.tar.gz | |
better TODO
svn:r31
Diffstat (limited to 'reconcile.py')
| -rw-r--r-- | reconcile.py | 19 |
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): |
