From cdd4e685ee95e44b9a599b03cf11723a4ce7b7c6 Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Wed, 13 May 2009 05:46:12 +0100 Subject: [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 --- parsers/logbooks.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'parsers/logbooks.py') 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("]*>", "", tripheader) - print [tripheader] + #print [tripheader] #continue tripdate, triptitle, trippeople = tripheader.split("|") -- cgit v1.2.3