HarryT suggested I post a little info about my new utility pielrf
for converting e-books in text form to LRF format. I designed pielrf
with Guteberg and OCR books in mind.
duplicates the look of Sony Connect EBooks, while incorporating ease of use, and full control over options. It includes much-requested features easy table of contents, chapterization, top-of-page headers, and curly quotes.
Most books only take a few minutes of preparation.
You can download pielrf
from the follwing thread.
Here's a few basics
RUNNING THE PROGRAM
pielrf -i infile.txt -o outfile.lrf -t "Book Title" -a "Author Name"
This will generate a basic LRF file, with a single "Table of Contents" entry, flowed paragraphs, curly-quotes and page headers.
EDITING THE INPUT FILE
If you want a Table of Contents and Chapters, it takes just ONE WORD
(!!) in your book's text file!
If your book is like this...
...Some More Text
Just do this...
...Some More Text
Both chapters are added to the Reader's Table of Contents, as well as a "Table of Contents" page. "Chapter One" and "Chapter Two" are also made headers for their respective chapters.
That's the only editing needed, and the rest is done automatically.
One Addition tag allows you to add text and vertical spacing on the TOC page.
Putting it on a line by itself adds a blank line to the TOC. Following it with text, similar to "<chapter>," adds that text to the TOC page.
HTML FOR TYPOGRAPHY
Unlike BookDesigner, you need to edit the input text file separately and add typographic HTML tags by hand before running pielrf.
While, for example, BookDesigner lets you highlight text and select "Italics," here, you would add the HTML tags "<i>" and "</i>" yourself.
The file does not have to be actual HTML (although it can be), you can add these tags to any plain text file.
<CENTER></CENTER> - Centered Text
<I></I> - Italics
<B></B> - Bold
<SUB></SUB> - Subscript
<SUP></SUP> - Superscript
<BR> - Line Break (Vertical Whitespace)
<P> - Paragraph (Use With "-b html" Command Line Switch)
<H3></H3> - Heading (Bold+Large Font) Tags (all resolve to same font size)
You can combine tags like "<center>" and "<h1>" for example, with the only limit being bold and italics -- its one or the other, so you won't get bold-italic text.
+ Table of Contents Menu and Page via the <chapter> tag.
+ Top-of-Page headers
+ Curly (typographic) quotes.
+ Paragraph auto-flow.
+ Can make whole book Bold to increase contrast.
+ Understands HTML tags <i></i>, <b></b>, <center></center>, <sub></sub>, <sup></sup>, <p></p>, <h1></h1>-<h3></h3>.
+ Understands ALL HTML Ampersand tags - &, £, üat, etc.
+ Paragraphs can be delimited by tabs, spaces, vertical whitespace.
+ Font size / weight (bold) can be controlled from command line.
+ Ability to control almost everything else from the command line too!
You can control just about every option regarding layout. The defaults should work just fine, and all you need to provide are the input and output files, and a title and author. But to see the options just type:
I provide a couple of examples in the next post.