View Single Post
Old 08-29-2009, 01:42 AM   #1
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
pacify.py (Text reformatter / RTF extractor)

Updated download as of 2009-08-29 12:27 EST
Updated download as of 2009-08-29 23:20 EST

Very much work in progress, and rather unpolished... but it's already turning out to be incredibly helpful to me in some eBook preparation, so I thought I would share it here.

Suggested use:

Produce HTML from text:
pacify.py -i input.txt -pcq

Produce LaTeX from text:
pacify.py -i input.txt -pcql gppro -T "Title of Book" -A "Lastname, Firstname" -S "a jolly good tale" -I "Ahi"

Produce HTML from RTF (preserving italic/bold formatting + footnotes):
pacify.py -i input.rtf -pcql gppro

Produce LaTeX from RTF (preserving italic/bold formatting + footnotes):
pacify.py -i input.rtf -pcql gppro -T "Title of Book" -A "Lastname, Firstname" -S "a jolly good tale" -I "Ahi"

The RTF extraction isn't very sophisticated yet... but should work fine with simple, straightforward RTF files.

- Ahi
Attached Files
File Type: zip pacify.zip (7.0 KB, 464 views)

Last edited by ahi; 08-31-2009 at 12:06 PM.
ahi is offline   Reply With Quote