diff options
author | wookey <devnull@localhost> | 2013-06-25 15:59:19 +0100 |
---|---|---|
committer | wookey <devnull@localhost> | 2013-06-25 15:59:19 +0100 |
commit | 81d9d7533e91a1f835c0f3aeabb02e22e02d5913 (patch) | |
tree | 2beb9ebf1cb8c18184f1a58ad1dd9b56421a3dba /parsers/logbooks.py | |
parent | badb93fcde595f9fe99389a6ff175567a81dc66a (diff) | |
download | troggle-81d9d7533e91a1f835c0f3aeabb02e22e02d5913.tar.gz troggle-81d9d7533e91a1f835c0f3aeabb02e22e02d5913.tar.bz2 troggle-81d9d7533e91a1f835c0f3aeabb02e22e02d5913.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/logbooks.py')
-rw-r--r-- | parsers/logbooks.py | 4 |
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") |