aboutsummaryrefslogtreecommitdiffstats
path: root/updateCache.py
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2016-02-04 22:52:07 -0500
committerThibaut Horel <thibaut.horel@gmail.com>2016-02-04 22:52:07 -0500
commit9096b58187e2bffb5846d727c61aaf616fddc9bc (patch)
tree2b6daf0890190c0c67a1553ee2e05cb647908f8d /updateCache.py
parente5f4e59bbbf65951631a79334b9c14211f193806 (diff)
downloadanonbib-9096b58187e2bffb5846d727c61aaf616fddc9bc.tar.gz
Also update rank.py and updateCache.py to new interface
Diffstat (limited to 'updateCache.py')
-rwxr-xr-xupdateCache.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/updateCache.py b/updateCache.py
index 7b7fe64..f247c24 100755
--- a/updateCache.py
+++ b/updateCache.py
@@ -10,6 +10,7 @@ import signal
import time
import gzip
+from utils import smartJoin
import BibTeX
import config
import urllib2
@@ -31,9 +32,8 @@ def tryUnlink(fn):
pass
def getCacheFname(key, ftype, section):
- return BibTeX.smartJoin(config.OUTPUT_DIR,config.CACHE_DIR,
- section,
- "%s.%s"%(key,ftype))
+ return smartJoin(config.OUTPUT_DIR,config.CACHE_DIR,
+ section, "%s.%s" % (key,ftype))
def downloadFile(key, ftype, section, url,timeout=None):
if timeout is None:
@@ -111,7 +111,7 @@ def getCachedURL(key, ftype, section):
def downloadAll(bibtex, missingOnly=0):
"""returns list of tuples of key, ftype, url, error"""
errors = []
- for e in bibtex.entries:
+ for e in bibtex:
urls = getURLs(e)
key = e.key
section = e.get("www_cache_section", ".")