Import: First step to making FTP archive files parse
Change regex to be explicit about the number of '*'s Pass the ftpArchive flag to HHC init
This commit is contained in:
parent
aae1ad082e
commit
fbfaf0176c
|
@ -266,7 +266,8 @@ which it expects to find at self.re_TailSplitHands -- see for e.g. Everleaf.py.
|
||||||
|
|
||||||
if self.ftpArchive == True:
|
if self.ftpArchive == True:
|
||||||
log.debug(_("Converting ftpArchive format to readable"))
|
log.debug(_("Converting ftpArchive format to readable"))
|
||||||
m = re.compile('^\*\*\*\*\*\*+\s#\s\d+\s\*\*\*\*\*+$', re.MULTILINE)
|
# Remove ******************** # 1 *************************
|
||||||
|
m = re.compile('\*{20}\s#\s\d+\s\*{25}\s+', re.MULTILINE)
|
||||||
self.obs = m.sub('', self.obs)
|
self.obs = m.sub('', self.obs)
|
||||||
|
|
||||||
if self.obs is None or self.obs == "":
|
if self.obs is None or self.obs == "":
|
||||||
|
|
|
@ -473,7 +473,8 @@ class Importer:
|
||||||
else:
|
else:
|
||||||
self.pos_in_file[file] = 0
|
self.pos_in_file[file] = 0
|
||||||
hhc = obj( self.config, in_path = file, out_path = out_path, index = idx
|
hhc = obj( self.config, in_path = file, out_path = out_path, index = idx
|
||||||
, starsArchive = self.settings['starsArchive'], sitename = site )
|
, starsArchive = self.settings['starsArchive'], ftpArchive = self.settings['ftpArchive'],
|
||||||
|
sitename = site )
|
||||||
if hhc.getStatus():
|
if hhc.getStatus():
|
||||||
handlist = hhc.getProcessedHands()
|
handlist = hhc.getProcessedHands()
|
||||||
self.pos_in_file[file] = hhc.getLastCharacterRead()
|
self.pos_in_file[file] = hhc.getLastCharacterRead()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user