Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Other formats > LRF

Notices

Reply
 
Thread Tools Search this Thread
Old 06-15-2007, 03:37 PM   #46
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You know, maybe I could give you commit access to a subdirectory of the libprs500 SVN server and you could switch development of pielrf to that. That way you'd get Windows and OSX installers for free as part of the libprs500 umbrella of utilities.
kovidgoyal is offline   Reply With Quote
Old 06-15-2007, 04:34 PM   #47
simmepimme
Junior Member
simmepimme is on a distinguished road
 
simmepimme's Avatar
 
Posts: 7
Karma: 67
Join Date: Dec 2006
I really like the look of the output for pielrf. A few questions:

- Is it possible to add some extra vertical space before each paragraph; I like some air between paragraphs?
- I can't get the bold functionality to work, and neither avoiding creating a TOC. pielrf logs that font weight 800 is used and that no TOC will be created, but neither of those are true...
- I've created an OSX application which wraps pielrf functionality in a GUI, for my personal use. It includes the pielrf stuff, but you have to install python >= 2.5 in /usr/local/bin yourself. Would it be OK for me to put it up for downloading?
simmepimme is offline   Reply With Quote
Advert
Old 06-15-2007, 06:31 PM   #48
EatingPie
Blueberry!
EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.
 
EatingPie's Avatar
 
Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
Quote:
Originally Posted by kovidgoyal View Post
You know, maybe I could give you commit access to a subdirectory of the libprs500 SVN server and you could switch development of pielrf to that. That way you'd get Windows and OSX installers for free as part of the libprs500 umbrella of utilities.
Thanks for the very kind offer Kovid! At this point, though, I'm going to keep it as a separate download. If I move toward needing additional features of libprs500 (like your extended image support), I'll consider this further.

-Pie
EatingPie is offline   Reply With Quote
Old 06-15-2007, 06:33 PM   #49
EatingPie
Blueberry!
EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.
 
EatingPie's Avatar
 
Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
Quote:
Originally Posted by simmepimme View Post
- I've created an OSX application which wraps pielrf functionality in a GUI, for my personal use. It includes the pielrf stuff, but you have to install python >= 2.5 in /usr/local/bin yourself. Would it be OK for me to put it up for downloading?
Great! Go ahead and throw it up and see what people think. It'd be wonderful to make this easier for Mac users, since there's no BookDesigner on "our side" of the fence.

Quote:
I really like the look of the output for pielrf. A few questions:

- Is it possible to add some extra vertical space before each paragraph; I like some air between paragraphs?
Not at this point. I'm pretty sure it's offered as an option, but I never implemented it. I'll double-check and add it after I get the next revision out.

Quote:
- I can't get the bold functionality to work, and neither avoiding creating a TOC. pielrf logs that font weight 800 is used and that no TOC will be created, but neither of those are true...
Unfortunately, bold is not very bold. I loaded a set of mixed text onto the Reader, and there was very little discernable difference. If you do bold and increase the font size, that makes it more noticable.

On the "--without-toc" option, it's a little misleading as named. This suppresses the generation of the TOC Menu, which is item #5 in the Reader's Navigation menu. However, it STILL generates a TOC page. I do not (yet) offer an option to suppress the TOC page.

Originally, I mishandled TextBlocks, and this would cause the Reader to slow to a crawl when loading some books that had a TOC Menu. So I added "--without-toc" for these slow-loading books. I've since fixed the TextBlock issue, but I left the "--without-toc" in.

-Pie
EatingPie is offline   Reply With Quote
Old 06-16-2007, 02:05 AM   #50
simmepimme
Junior Member
simmepimme is on a distinguished road
 
simmepimme's Avatar
 
Posts: 7
Karma: 67
Join Date: Dec 2006
OSX GUI for pielrf

Thanks for the explanation!

I'm attaching the OSX application; it's also available for downloading at http://www.ozymandias.se/Pielrf.dmg.

Note: New version attached using pielrf 2.1.2, and also adds pielrf installation procedure from within GUI (had forgot that before). Also, you have to run this installation procedure again since a new pielrf lib is used.
Attached Files
File Type: zip PielrfGUI.dmg.zip (376.5 KB, 818 views)

Last edited by simmepimme; 06-25-2007 at 05:46 PM. Reason: New versions uploaded, using pielrf 2.1.2
simmepimme is offline   Reply With Quote
Advert
Old 06-16-2007, 02:18 PM   #51
EatingPie
Blueberry!
EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.
 
EatingPie's Avatar
 
Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
TEST POST

Here's a test post for pielrf 2.1 to see if I have solved the Windows problems with the ZIP. I compressed this one using a brand new zip utility.

EDIT: Works perfectly for me, booted into Windows XP Pro. I also tried the 2.0.3 post, and it worked fine too.

EDIT: File Removed, See first post of this thread for correct Version 2.1, created with same zip program.

-Pie

Last edited by EatingPie; 06-16-2007 at 10:33 PM.
EatingPie is offline   Reply With Quote
Old 06-16-2007, 10:28 PM   #52
EatingPie
Blueberry!
EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.
 
EatingPie's Avatar
 
Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
Post Version 2.1 - Preferences File, Justified and Verse Text, Plus More!

New version pielrf 2.1.

See the first post to download.

Lots and lots of changes, both new features, bug fixes, and under-the-hood cleanup.

NEW FEATURES
- UNIX style "preferences" file, ".pielrfrc" and a "--write-rc" function.
- <justified></justified> tags simply remove the indent on the first line of a paragraph in any paragraphs between these tags.
- <verse></verse> tags for proper indentation of poetry.
- "--verseparindent" a NEGATIVE number which pulls the first line of the verse further to toward the left margin. The Margin of subsequent lines in the same verse are shared with "--quoteoffset"
- Added "--html-quotes" and "--trust-html" as aliases to the "--use-rdquotes" switch. They make more sense.
BUG FIXES
- Fixed "<<" (double less-than). Pielrf now outputs the same number less-than signs it encounters! (I even tested it this time, so it's really fixed!)
- Formatting tags "<center>" and "<h1>,<h2>,etc." no longer create vertical whitespace when encountered... unless they are on paragraph -- this allows for more "fine grained" control of formatting.
- Bold, Italic, Subscript and Superscript can all be combined (well, not Subscript/Superscript).
- Multiple <blockquote> levels are now supported, to a maximum of 3 levels. Pielrf will not indent further than 3 <blockquote> levels -- if it encounters fruther <blockquotes>, those remain indented at level 3.
- Both "--html-quotes" (aka "--use-rdquotes") and "--preserve-spaces" now apply correctly.
Preferences (.pielrfrc) File

My original intent for providing full control over command line options came because I realized that people have a wide variety of tastes in the "look and feel" of their e-books. The problem is, if you don't like the default settings, that can add up to a lot of typing for every book you convert. The ".pielrfrc" file stores all formatting options so you don't have to re-type them every time, and command line options will still override the ".pielrfrc" options when you need to!

Note that non-formatting related command line options like "--title", "--author", "--headerstyle", etc. are not stored in the .pielrfrc file, since they change for every book.

The .pielrfrc is NOT created automatically. You can create one yourself, or you can have pielrf write out the current options with the "--writerc" command line switch.
pielrf -t "Harry Potter" -a "Rowling, J.K." -i hp.txt -o hp.lrf --fontsize=200 --bold --parindent=30 --baselineskip=150 --write-rc
This creates (or overwrites) the ".pielrfrc" file in your home directory. Either "/Users/<username>/.pielrfrc" on Mac OS X / Linux / UNIX or "c:\Documents and Settings\<username>\.pielrfrc" on Windows.

Thanks to Lee Bigelow for providing the code for this feature

FORMATTING ADDITIONS

The new tags "<justified></justified>" and "<verse></verse>" allow you to mix paragraph styles within the text.

Standard text has every paragraph's first line indented by the amount indicated in "parindent" to delimit a tab (you know, every paragraph in a book).

<justified></justified> tag makes the whole paragraph left justify, meaning it does not have the first-line indentation.

<verse></verse> makes each paragraph reverse-indent. The first line is justified (on the left margin), and subsequent lines are indented. This allows you to include poetry in your book.

The defaults for "--verseparindent" matches exactly with the default margins and indent used by pielrf. If you use the <verse></verse> tags AND change your margins, you probably need to adjust the "--verseparindent" and "--quoteoffset" options. Beside the default, using "--quoteoffset=50" and "--verseparindent=-225" are good alternatives.


FORMATTING CHANGES

(1) The main change is that the formatting tags "<center>" and "<h1>,<h2>,etc." used to generate a new paragaraph when the open/close tags were encountered. This is no longer the case -- unless the tags form their own paragraph (see below). For example, you can now have standard paragraphs followed by centered text with no interveneing vertical whitespace (crs).

Here's two examples to illustrate behaviour of the center tag.
<tabchar>And this time he'd make sure they didn't fail. He had a plan.
<center>
* * *
</center>
<tabchar>The repaired alarm clock rang at six o'clock the next morning.
Generates
And this time he'd make sure they didn't fail. He had a plan.
* * *
The repaired alarm clock rang at six o'clock the next morning.
And this...
<tabchar>And this time he'd make sure they didn't fail. He had a plan.
<tabchar><center>
<tabchar>* * *
<tabchar></center>
<tabchar>The repaired alarm clock rang at six o'clock the next morning.
Generates
And this time he'd make sure they didn't fail. He had a plan.

* * *

The repaired alarm clock rang at six o'clock the next morning.
In these examples, <tabchar> is the actual tab character, and is the paragraph telimiter (-b tab).

(2) The "<blockquote>", however, still generates a single vertical whitespace. Though if you have mulitple <blockquotes> in a row, you get only 1 vertical whitespace.

-Pie
EatingPie is offline   Reply With Quote
Old 06-17-2007, 07:55 PM   #53
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,858
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
When you tested it in Windows, did you test the install and see that it actually works without having to call Python? If you have to call Python in Windows, then you might as well give it up for lost for most novices as that will lose then totally.
JSWolf is online now   Reply With Quote
Old 06-17-2007, 08:36 PM   #54
Lime2K
Member
Lime2K began at the beginning.
 
Lime2K's Avatar
 
Posts: 21
Karma: 10
Join Date: May 2007
Device: Sony Reader (PRS-500)
if they're using the command line anyway, it's not hard to add ONE WORD to the command you're typing. Please quit whining about trivial things, and let Pie focus on adding features that are useful.

Thx.
Lime2K is offline   Reply With Quote
Old 06-17-2007, 08:45 PM   #55
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,858
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Lime2K View Post
if they're using the command line anyway, it's not hard to add ONE WORD to the command you're typing. Please quit whining about trivial things, and let Pie focus on adding features that are useful.

Thx.
For people not used to a command line, they'd have to find the path to where Python lives and put in the full path in the command line as well as the command. This will cause a lot of frustration. If the Python programs had the .py extensions on them it would be a lot easier to just type pielrf.py and then whatever option you wanted. The tools need to be made easy to use or they won't get used. This is the way it is. It's not whining. People who grew up in a GUI world and did not learn the command line need to have the command line programs made as easy to use as possible.
JSWolf is online now   Reply With Quote
Old 06-18-2007, 02:29 AM   #56
EatingPie
Blueberry!
EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.
 
EatingPie's Avatar
 
Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
Quote:
Originally Posted by JSWolf View Post
When you tested it in Windows, did you test the install and see that it actually works without having to call Python? If you have to call Python in Windows, then you might as well give it up for lost for most novices as that will lose then totally.
Indeed, I don't have python in my Windows path, so I certainly have seen the benefit of this feature.

As I mentioned in a previous post, I couldn't get this to work in time for the 2.1 release, but will do it in an upcoming version. I'll either have to rename the pielrf library, or use py2exe as kovidgoyal suggested... both of which would have held pielrf 2.1 up, and it was already overdue.

Rest assured, though, it's on my list of features to implement.

-Pie

Last edited by EatingPie; 06-18-2007 at 02:32 AM.
EatingPie is offline   Reply With Quote
Old 06-20-2007, 03:02 AM   #57
Lime2K
Member
Lime2K began at the beginning.
 
Lime2K's Avatar
 
Posts: 21
Karma: 10
Join Date: May 2007
Device: Sony Reader (PRS-500)
I have a request for a feature. Is there any way to implement a <h0> tag, to force text that pielrf normally makes a header (like the first bit of a section, up to the first paragraph) to display as normal paragraphs? I'm trying to do a bit that looks like this:

<center> text </center>
<center> more text </center>
<center><h1> REALLY BIG TITLE TEXT </h1></center>
<center><h2> Medium Size Author Text </h2></center>
<center> still more text </center>
<center> backup backup text </center>

and only have the two lines in the middle show up bigger.
Any suggestions?
P.S. Thanks for fixing the << issue, I LOL'd at your comment in the readme (especially since I knew it was directed ar me ^_^)
Lime2K is offline   Reply With Quote
Old 06-20-2007, 05:24 AM   #58
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,858
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
It would be a nice idea to be able to specify text in the font and font size we want. I would love to be able to have embedded fonts.
JSWolf is online now   Reply With Quote
Old 06-20-2007, 01:55 PM   #59
EatingPie
Blueberry!
EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.
 
EatingPie's Avatar
 
Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
Quote:
Originally Posted by Lime2K View Post
I have a request for a feature. Is there any way to implement a <h0> tag, to force text that pielrf normally makes a header (like the first bit of a section, up to the first paragraph) to display as normal paragraphs? I'm trying to do a bit that looks like this:

<center> text </center>
<center> more text </center>
<center><h1> REALLY BIG TITLE TEXT </h1></center>
<center><h2> Medium Size Author Text </h2></center>
<center> still more text </center>
<center> backup backup text </center>

and only have the two lines in the middle show up bigger.
Any suggestions?
P.S. Thanks for fixing the << issue, I LOL'd at your comment in the readme (especially since I knew it was directed ar me ^_^)
If I interpret what you're asking correctly, there's a workaround. Specify "--chapterfontsize=95" and "--chapterfontweight=400" to have it match normal text. THEN you can add an <h1> tag to enlarge the font. Sort of a backwards way of doing what you're asking!

Quote:
Originally Posted by JSWolf View Post
It would be a nice idea to be able to specify text in the font and font size we want. I would love to be able to have embedded fonts.
I'll have to look into the embedded fonts, along with the <h0> idea. Right now, I only have limited support of font sizes -- basically two sizes, normal and header. I don't currently have plans to move beyond this, but... we'll see.

-Pie
EatingPie is offline   Reply With Quote
Old 06-20-2007, 03:44 PM   #60
Lime2K
Member
Lime2K began at the beginning.
 
Lime2K's Avatar
 
Posts: 21
Karma: 10
Join Date: May 2007
Device: Sony Reader (PRS-500)
Quote:
Originally Posted by EatingPie View Post
If I interpret what you're asking correctly, there's a workaround. Specify "--chapterfontsize=95" and "--chapterfontweight=400" to have it match normal text. THEN you can add an <h1> tag to enlarge the font. Sort of a backwards way of doing what you're asking!
Sweet! I'll play around with this when I get home from work tonight!

EDIT: I tried compiling the file as you said, but the H1 and H2 tags are not affecting the text at all. I also tried it with a tab at the beginning of each line in the header, and no dice. Everything is all small (which _does_ look better than everything being frickin' huge)

Last edited by Lime2K; 06-21-2007 at 01:44 AM.
Lime2K is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
convert straight quotes to curly quotes alansplace Calibre 3 09-25-2010 03:51 PM
curly quotes DaleDe Sigil 6 06-26-2010 10:33 PM
A tool for converting to curly quotes Snowman Workshop 7 02-08-2009 12:22 PM
Austen, Jane: Emma HTML (PDA and iPhone-friendly) with curly quotes etc andym Other Books 6 09-11-2007 02:00 PM
PRS-500 pielrf beta - Text to LRF with Easy TOC, autoflow, etc. EatingPie Sony Reader Dev Corner 9 05-11-2007 10:51 PM


All times are GMT -4. The time now is 06:33 PM.


MobileRead.com is a privately owned, operated and funded community.