aboutsummaryrefslogtreecommitdiffstats
path: root/writeHTML.py
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-07-10 18:42:56 +0000
committerNick Mathewson <nickm@torproject.org>2007-07-10 18:42:56 +0000
commitef19d6e6ffdcc5ea552a2ac5ceb7e01c1e00bef9 (patch)
treed0a310bbbe8460db50438a00d6c88c316781616a /writeHTML.py
parent7569ee874013990b661875748fe39a85dd70c2a1 (diff)
downloadanonbib-ef19d6e6ffdcc5ea552a2ac5ceb7e01c1e00bef9.tar.gz
r13683@catbus: nickm | 2007-07-10 14:42:53 -0400
Patch from George to add citation-rank-based icons to anonbib output. Hacked up a bit so that "cache" and "generate page" are separate, so that the image urls are no longer hardwired to ~george, so output locations are configurable, etc. svn:r234
Diffstat (limited to 'writeHTML.py')
-rwxr-xr-xwriteHTML.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/writeHTML.py b/writeHTML.py
index 3184ef0..934b46b 100755
--- a/writeHTML.py
+++ b/writeHTML.py
@@ -29,7 +29,7 @@ def pathLength(s):
s = parent
return n
-def writeBody(f, sections, section_urls, cache_path):
+def writeBody(f, sections, section_urls, cache_path, base_url):
'''f: an open file
sections: list of (sectionname, [list of BibTeXEntry])
section_urls: map from sectionname to external url'''
@@ -45,7 +45,7 @@ def writeBody(f, sections, section_urls, cache_path):
BibTeX.url_untranslate(s),sDisp))
print >>f, "<ul class='expand'>"
for e in entries:
- print >>f, e.to_html(cache_path=cache_path)
+ print >>f, e.to_html(cache_path=cache_path, base_url=base_url)
print >>f, "</ul></li>"
def writeHTML(f, sections, sectionType, fieldName, choices,
@@ -104,7 +104,8 @@ def writeHTML(f, sections, sectionType, fieldName, choices,
header, footer = getTemplate(config.TEMPLATE_FILE)
print >>f, header%fields
- writeBody(f, sections, section_urls, cache_path=cache_url_path)
+ writeBody(f, sections, section_urls, cache_path=cache_url_path,
+ base_url=root)
print >>f, footer%fields
def writePageSet(config, bib, tag):