diff options
author | goatchurch <devnull@localhost> | 2009-06-09 18:59:54 +0100 |
---|---|---|
committer | goatchurch <devnull@localhost> | 2009-06-09 18:59:54 +0100 |
commit | 17175637dcd90adaa2d59c5ef127d9e710a2e716 (patch) | |
tree | f831c55b7727146e811cd1ff1542ddfcd4185ecc /parsers/logbooks.py | |
parent | 32b5c7fbb098e14f1340122bbb7c1df205d01173 (diff) | |
download | troggle-17175637dcd90adaa2d59c5ef127d9e710a2e716.tar.gz troggle-17175637dcd90adaa2d59c5ef127d9e710a2e716.tar.bz2 troggle-17175637dcd90adaa2d59c5ef127d9e710a2e716.zip |
[svn] codemirror
Diffstat (limited to 'parsers/logbooks.py')
-rw-r--r-- | parsers/logbooks.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/parsers/logbooks.py b/parsers/logbooks.py index 281a1b2..ebfd54e 100644 --- a/parsers/logbooks.py +++ b/parsers/logbooks.py @@ -166,7 +166,7 @@ def Parseloghtml01(year, expedition, txt): tripparas = re.findall("<hr[\s/]*>([\s\S]*?)(?=<hr)", txt)
for trippara in tripparas:
s = re.match(u"(?s)\s*(?:<p>)?(.*?)</?p>(.*)$(?i)", trippara)
- assert s, trippara[:100]
+ assert s, trippara[:300]
tripheader, triptext = s.group(1), s.group(2)
mtripid = re.search('<a id="(.*?)"', tripheader)
tripid = mtripid and mtripid.group(1) or ""
@@ -177,7 +177,7 @@ def Parseloghtml01(year, expedition, txt): tripdate, triptitle, trippeople = tripheader.split("|")
ldate = ParseDate(tripdate.strip(), year)
-
+
mtu = re.search('<p[^>]*>(T/?U.*)', triptext)
if mtu:
tu = mtu.group(1)
@@ -203,9 +203,9 @@ def Parseloghtml01(year, expedition, txt): ltriptext = re.sub("</?b>", "'''", ltriptext)
- #print ldate, trippeople.strip()
+ print ldate, trippeople.strip()
# could includ the tripid (url link for cross referencing)
- EnterLogIntoDbase(date = ldate, place = tripcave, title = triptitle, text = ltriptext, trippeople=trippeople, expedition=expedition, logtime_underground=0)
+ EnterLogIntoDbase(date=ldate, place=tripcave, title=triptitle, text=ltriptext, trippeople=trippeople, expedition=expedition, logtime_underground=0)
def Parseloghtml03(year, expedition, txt):
@@ -254,6 +254,7 @@ yearlinks = [ ("1995", "1995/log.htm", Parseloghtml01),
("1994", "1994/log.htm", Parseloghtml01),
("1993", "1993/log.htm", Parseloghtml01),
+ ("1992", "1992/log.htm", Parseloghtml01),
]
def SetDatesFromLogbookEntries(expedition):
|