summaryrefslogtreecommitdiffstats
path: root/parsers/logbooks.py
diff options
context:
space:
mode:
authorsubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 05:46:12 +0100
committersubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 05:46:12 +0100
commitcdd4e685ee95e44b9a599b03cf11723a4ce7b7c6 (patch)
tree6ca7a91dc7c1a9ce15d078c6ee5729fb16afe3a4 /parsers/logbooks.py
parent84e9cc339615ed9b183ec4ba9820200f9141bb00 (diff)
downloadtroggle-cdd4e685ee95e44b9a599b03cf11723a4ce7b7c6.tar.gz
troggle-cdd4e685ee95e44b9a599b03cf11723a4ce7b7c6.tar.bz2
troggle-cdd4e685ee95e44b9a599b03cf11723a4ce7b7c6.zip
[svn] cave maps to all logbook entry trips done there
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8228 by julian @ 1/24/2009 11:59 PM
Diffstat (limited to 'parsers/logbooks.py')
-rw-r--r--parsers/logbooks.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/parsers/logbooks.py b/parsers/logbooks.py
index 9ad1962..3bad8c4 100644
--- a/parsers/logbooks.py
+++ b/parsers/logbooks.py
@@ -63,13 +63,16 @@ def GetTripCave(place): #need to be fuzzier about matching h
return
+noncaveplaces = [ "Journey", "Loser Plateau" ]
def EnterLogIntoDbase(date, place, title, text, trippeople, expedition, logtime_underground):
trippersons, author = GetTripPersons(trippeople, expedition, logtime_underground)
# tripCave = GetTripCave(place)
lbo = models.LogbookEntry(date=date, place=place, title=title[:50], text=text, author=author, expedition=expedition)
- lbo.cave=GetCaveLookup().get(place)
- print "pppp", place, lbo.cave
+ lplace = place.lower()
+ if lplace not in noncaveplaces:
+ lbo.cave=GetCaveLookup().get(lplace)
+ print "pppp %s |%s|" % (lplace, str(lbo.cave))
lbo.save()
#print "ttt", date, place
@@ -158,7 +161,7 @@ def Parseloghtml01(year, expedition, txt):
tripid = mtripid and mtripid.group(1) or ""
tripheader = re.sub("</?(?:[ab]|span)[^>]*>", "", tripheader)
- print [tripheader]
+ #print [tripheader]
#continue
tripdate, triptitle, trippeople = tripheader.split("|")