summaryrefslogtreecommitdiffstats
path: root/parsers
diff options
context:
space:
mode:
authorwookey <devnull@localhost>2013-06-25 15:59:19 +0100
committerwookey <devnull@localhost>2013-06-25 15:59:19 +0100
commit3f98470af862d6fddea772efea41dec986e53bda (patch)
tree5927d15fb280671d5df7d5fee511680154105e87 /parsers
parente58b69782c6f85ec45bfff8c927da90c643c0c56 (diff)
downloadtroggle-3f98470af862d6fddea772efea41dec986e53bda.tar.gz
troggle-3f98470af862d6fddea772efea41dec986e53bda.tar.bz2
troggle-3f98470af862d6fddea772efea41dec986e53bda.zip
Add a function for running people parser
And comments on how logbooks can't be read in until 'year' exists in database
Diffstat (limited to 'parsers')
-rw-r--r--parsers/logbooks.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/parsers/logbooks.py b/parsers/logbooks.py
index 9c5b106..4180345 100644
--- a/parsers/logbooks.py
+++ b/parsers/logbooks.py
@@ -253,6 +253,8 @@ def Parseloghtml03(year, expedition, txt):
EnterLogIntoDbase(date = ldate, place = tripcave, title = triptitle, text = ltriptext, trippeople=trippeople, expedition=expedition, logtime_underground=0)
yearlinks = [
+# ("2013", "2013/logbook.html", Parseloghtmltxt),
+ ("2012", "2012/logbook.html", Parseloghtmltxt),
("2011", "2011/logbook.html", Parseloghtmltxt),
("2010", "2010/logbook.html", Parselogwikitxt),
("2009", "2009/2009logbook.txt", Parselogwikitxt),
@@ -323,6 +325,8 @@ def LoadLogbooks():
#yearlinks = [ ("1996", "1996/log.htm", Parseloghtml01),] # overwrite
for year, lloc, parsefunc in yearlinks:
+ # This will not work until the corresponding year exists in the database.
+ # In 2012 this needed noscript/folk.csv to be updated first.
expedition = models.Expedition.objects.filter(year = year)[0]
fin = open(os.path.join(expowebbase, lloc))
txt = fin.read().decode("latin1")