summaryrefslogtreecommitdiffstats
path: root/segment.py
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-07-23 17:13:39 +0800
committerPeng Wu <alexepico@gmail.com>2011-07-23 17:13:39 +0800
commit4e18ee54f475ee6ca588d9504c627a4dfa409645 (patch)
treed85bba43c17df8465642af0115cb6abe5c111c03 /segment.py
parentabead147cd1eea3ff7ba8b34055374a8ad812464 (diff)
downloadtrainer-4e18ee54f475ee6ca588d9504c627a4dfa409645.tar.gz
trainer-4e18ee54f475ee6ca588d9504c627a4dfa409645.tar.xz
trainer-4e18ee54f475ee6ca588d9504c627a4dfa409645.zip
write generate.py in progress
Diffstat (limited to 'segment.py')
-rwxr-xr-xsegment.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/segment.py b/segment.py
index b65bfd7..ef7a53b 100755
--- a/segment.py
+++ b/segment.py
@@ -57,9 +57,9 @@ def handleOneIndex(indexpath):
#begin processing
indexfile = open(indexpath, 'r')
for oneline in indexfile.readlines():
- (title, textpath) = oneline.split('#')
#remove tailing '\n'
- textpath = textpath.rstrip(os.linesep)
+ oneline = oneline.rstrip(os.linesep)
+ (title, textpath) = oneline.split('#')
infile = config.getTextDir() + textpath
outfile = config.getTextDir() + textpath + config.getSegmentPostfix()
reportfile = config.getTextDir() + textpath + \