version 1.7, 2007/08/31 14:22:52
|
version 1.7.2.1, 2007/10/06 13:44:46
|
Line 79 class cdliSplitter:
|
Line 79 class cdliSplitter:
|
|
|
|
|
def process(self, lst): |
def process(self, lst): |
|
logging.debug("cdliSplitter") |
result = [] |
result = [] |
pNum=None |
pNum=None |
lineNum=None |
lineNum=None |
Line 93 class cdliSplitter:
|
Line 94 class cdliSplitter:
|
|
|
if (s!="") and (s[0]=="&"): # store pNum |
if (s!="") and (s[0]=="&"): # store pNum |
pNum=s[1:8] |
pNum=s[1:8] |
logging.debug("storing: %s"%pNum) |
logging.debug("cdliSplitter processing: %s"%pNum) |
|
|
elif (s!="") and (not (s[0] in ignoreLines)): |
elif (s!="") and (not (s[0] in ignoreLines)): |
splitted=s.split(".") |
splitted=s.split(".") |
|
|
Line 115 class cdliSplitter:
|
Line 117 class cdliSplitter:
|
IndexLine("/tmp/index",analyser,pNum,lineNum,analyse) |
IndexLine("/tmp/index",analyser,pNum,lineNum,analyse) |
else: |
else: |
splitted = analyse.split(" ") |
splitted = analyse.split(" ") |
|
|
|
|
for w in splitted: |
for w in splitted: |
w=w.lstrip().rstrip() |
w=w.lstrip().rstrip() |
|
|
if not (w==''): |
if not (w==''): |
if pNum: #only whe pnum is found (first call of the splitter, is always called twice in the pipeline |
#if pNum: #only whe pnum is found (first call of the splitter, is always called twice in the pipeline |
|
# Zope2.app().cdliRoot.storeInLineIndex(self.indexName,w.lstrip().strip(),(pNum,lineNum)) |
Zope2.app().cdliRoot.storeInLineIndex(self.indexName,w.lstrip().strip(),(pNum,lineNum)) |
# transaction.get().commit() |
transaction.get().commit() |
|
|
|
result.append(w.lstrip().rstrip()) |
result.append(w) |
return result |
return result |
|
|
|
|