Thanks for this code. It looks like it does a very nice job of an arduous task.
I ran the python script with just -r and it worked, but with -pqr it crashed yielding this error message:
Code:
E:\ebooks\Coding_Mobi2IMP_PDFRead\pacify>pacify.py -i 157.txt -pqr
pacify v0.2 - Copyright 2009 Pax Librorum (www.PaxLibrorum.com)
Right-trimming lines...
Parsing...
line break: nr (2643)
paragraph break: nrnr (823)
...: (46)
Removing intraparagraph linebreaks...
Fixing erroneous paragraph breaks...
Traceback (most recent call last):
File "E:\ebooks\Coding_Mobi2IMP_PDFRead\pacify\pacify.py", line 802, in <module>
main()
File "E:\ebooks\Coding_Mobi2IMP_PDFRead\pacify\pacify.py", line 111, in main
theTome = parfixTome(theTome)
File "E:\ebooks\Coding_Mobi2IMP_PDFRead\pacify\pacify.py", line 440, in parfix Tome
if strLowerAlpha.find(theTome[idx+2][0:1]) > -1:
IndexError: list index out of range
Could you also create a windows executable, pacify.exe, for those here that don't do python? I did create one myself using py2exe and this setup.py code (used in PDFRead

):
Code:
import py2exe
from distutils.core import setup
setup(
name = 'Pacify',
description = 'Text reformatter / RTF extractor - Copyright 2009 Pax Librorum (www.PaxLibrorum.com)',
version = '0.2',
author = 'ahi',
author_email = 'http://www.paxlibrorum.com/contact/',
console = ['pacify.py'],
options = {"py2exe": {"typelibs": [('{1103EA00-3A0C-11D3-A6F6-00104B2947FB}',0,1,0)]}},
)