From b33061a3cecad77058d0576dab32b42452e3608a Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Wed, 13 May 2009 05:18:49 +0100 Subject: [PATCH] [svn] Converted

tags to wiki style "\n\n" Tidied header Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8063 by julian @ 11/6/2008 11:29 PM --- parsers/cavetab.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/parsers/cavetab.py b/parsers/cavetab.py index ed04338..25a9d81 100644 --- a/parsers/cavetab.py +++ b/parsers/cavetab.py @@ -1,12 +1,10 @@ # -*- coding: utf-8 -*- import sys -sys.path.append('C:\\Expo\\expoweb\\troggle\\') import settings import expo.models as models import csv import time -#import sqlite3 import re import os @@ -88,8 +86,9 @@ def html_to_wiki(text): #if s: # print s.groups() #Lists - text = re.sub("^

(.*)", r"\1", text) - text = re.sub("(.*)

$", r"\1", text) + text = re.sub("

", r"", text) + text = re.sub("

$", r"", text) + text = re.sub("

", r"\n\n", text) out = "" lists = "" while text: