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-24-2007, 01:39 PM   #76
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
That's probably true. A way to feed it multiple files, and have links between them, would be awesome. Or even if there was a way to bookmark points in a single long file, and link between them, and I would love you forever (in a non-prison-movie way, of course...)

Oh, and the feature where pielrf doesn't make a TOC on a file without <chapter> tags isn't working for me. It just makes a TOC with a single entry of the first line of the file. Do I need to add --disable-toc to force this behaivor? Or did you fix it in 2.1.2, 'cause I havent downloaded that version yet?
Yeah, links are something I looked at a while back, and just decided I didn't know what to do with them. I'm a bit more savvy now and might be able to find a solution.

And on the no-TOC feature, I thought I fixed it in 2.1.1, but in retrospect, I think it's 2.1.2 that does it (hence me leaving it out of the feature list). Regardless, I recommend the latest version. It fixes also fixes a major bug with stripping HTML which I didn't list, and I've since discovered it was far worse than I knew (the advantage of the developer actually USING his product!).

Every time you update, always remember to do a:
python setup.py install
Most changes occur in the library these days.

-Pie
EatingPie is offline   Reply With Quote
Old 06-24-2007, 04:07 PM   #77
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,744
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
pie if you want to support links you have to write a recursive algorithm, take a look at html2lrf's code.
kovidgoyal is offline   Reply With Quote
Old 07-03-2007, 02:34 PM   #78
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
Now Sticky... my humble and hearty thanks to the admins!

-Pie
EatingPie is offline   Reply With Quote
Old 07-03-2007, 02:46 PM   #79
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
I've been considering the features recently discussed (and thanks for the recursion pointer kovid!). At this point, however, I am pursuing a related program for a very specific application. I'm not completely optimistic, so I don't want to say too much, but I wanted to give everyone a heads-up in terms of what I'm doing.

I do have a few things in regards to pielrf specifically.

First, and foremost, while I work on the new project, I will continue to fix bugs as they're reported.

Second, I am planning two changes to defaults, and I wanted to know how others felt.
+--baselinkskip=120
+--trust-html
I would like to make these options default. Right now baselineskip is 100, and it's fairly cramped, especially in relation to other paperback books. A default of 120 opens things up a bit and strikes me as easier on the eyes. You can still set --baselinksip to whatever you want, this is just a change in the DEFAULT.

The --trust-html option is for HTML quotes. By default pielrf abandons html-specified curly quotes and uses its own algorithm. Now that I've been using the program for a while, I've found that it's generally better to trust the HTML curly quotes. I would add a reverse option so you can override override the HTML curly quotes and use pielrf's algorithm when necessary.

Does this sound good, bad, indifferent? Let me know.

-Pie
EatingPie is offline   Reply With Quote
Old 07-03-2007, 03:09 PM   #80
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 suggestion for a couple of new tags (one should be easy, the others might be harder):

<pgbreak> - forces a new page like <chapter> does, without making an entry in the TOC (would be useful for title pages, among other things)

<u>underline</u>

<monospace> or <mono> - force the text into a monospace (courier-ish) font (i dunno if the reader has one built-in, offhand) and have all spaces displayed (would be useful for tables, and things of that nature)

and maybe inline images, somehow?
Lime2K is offline   Reply With Quote
Old 07-28-2007, 10:06 PM   #81
ns66
Connoisseur
ns66 doesn't litterns66 doesn't litter
 
Posts: 78
Karma: 156
Join Date: Jul 2007
Device: sony reader
is there a way to not page break a new chapter? with too many chapters page breaks really wasted limited realestate

also any way to make a cover page with title and author?

if not implemented any pointer where to modify the code?

thanks

Last edited by ns66; 07-29-2007 at 03:16 AM.
ns66 is offline   Reply With Quote
Old 07-30-2007, 03:42 PM   #82
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
Hi.

There is a way, and for my aforementioned "other project" I have started the code to do so. How this will blend back into pielrf, I'm not yet sure as I've been sidetracked from THAT project by something else. I'm pretty much done with this "something else"... unless I want to read The Deathly Hallows for a 3rd time... and I just might.

In terms of code, this requires a new class that doesn't page-break at a chapter. It can be derived from the existing classes IIRC, but I haven't looked at the code in a few weeks.

-Pie
EatingPie is offline   Reply With Quote
Old 07-30-2007, 04:55 PM   #83
tsgreer
Lovin' the e-book life...
tsgreer plays well with otherstsgreer plays well with otherstsgreer plays well with otherstsgreer plays well with otherstsgreer plays well with otherstsgreer plays well with otherstsgreer plays well with otherstsgreer plays well with otherstsgreer plays well with otherstsgreer plays well with otherstsgreer plays well with others
 
tsgreer's Avatar
 
Posts: 633
Karma: 2509
Join Date: Nov 2006
Location: Colorado
Device: Ebookwise 1150, Sony PRS-505, Amazon Kindle, BeBook (with OpenInkpot)
What about images? Is there any way to work images in somewhere when making a book with Pielrf? I like cover images and also it would be useful when the book calls for illustrations inside...
tsgreer is offline   Reply With Quote
Old 07-30-2007, 06:28 PM   #84
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,510
Karma: 126422064
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Can I be really silly here? This sounds like it's going to turn into another html2lrf.
JSWolf is offline   Reply With Quote
Old 08-02-2007, 10:18 PM   #85
Lime2K
Member
Lime2K began at the beginning.
 
Lime2K's Avatar
 
Posts: 21
Karma: 10
Join Date: May 2007
Device: Sony Reader (PRS-500)
Talking

Here's a bug report, _and_ the fix for it (it was a really easy one)

PieLRF wasn't recognizing &lsquo; and &rsquo; as single quotes.

Here's the original code <in textconvert.py>, under <def convert_html_ampersands>

Code:
The original code:
if html_quotes :
	line = line.replace("&ldquo;", u"\u201C") # OPEN
	line = line.replace("&rdquo;", u"\u201D") # CLOSE
	line = line.replace("“", u"\u201C")
	line = line.replace("”", u"\u201D")
	line = line.replace("‘", u"\u2018")
	line = line.replace("’", u"\u2019")
else :
	line = line.replace("&ldquo;", u"\"")
	line = line.replace("&rdquo;", u"\"")
	line = line.replace("“", u"\"")
	line = line.replace("”", u"\"")
	line = line.replace("‘", u"'")
	line = line.replace("’", u"'")
#endif 

Replace with:
if html_quotes :
	line = line.replace("&ldquo;", u"\u201C") # OPEN
	line = line.replace("&rdquo;", u"\u201D") # CLOSE
	line = line.replace("“", u"\u201C")
	line = line.replace("”", u"\u201D")
	line = line.replace("&lsquo;", u"\u2018")
	line = line.replace("&rsquo;", u"\u2019")
	line = line.replace("‘", u"\u2018")
	line = line.replace("’", u"\u2019")
else :
	line = line.replace("&ldquo;", u"\"")
	line = line.replace("&rdquo;", u"\"")
	line = line.replace("“", u"\"")
	line = line.replace("”", u"\"")
	line = line.replace("&lsquo;", u"'")
	line = line.replace("&rsquo;", u"'")
	line = line.replace("‘", u"'")
	line = line.replace("’", u"'")
#endif
This keeps the correct behavior of --html-quotes.

I fixed it in my personal copy already, but am posting it here so it makes it into the official releases as well.

Enjoy!
Lime2K is offline   Reply With Quote
Old 08-03-2007, 03:12 AM   #86
ns66
Connoisseur
ns66 doesn't litterns66 doesn't litter
 
Posts: 78
Karma: 156
Join Date: Jul 2007
Device: sony reader
why even if i set margins=0, there are still space on left and right side, how do i make them smaller to make more use of the precsious screen? make screen width bigger like 620 doesn't help either

thx
ns66 is offline   Reply With Quote
Old 09-04-2007, 07:32 PM   #87
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
Man. I added this myself, and decided that -- while I was at it -- I should come back here to add your code too (assuming it was a different feature!). That's what I get for reading a bunch of books in my spare time instead of this thread!

I'll post an update in a few days. I also have the code for non-page-breaking Chapters, but it's not plugged in yet. I have to try it out then I'll probably post the update flagged as beta.

Sorry, no image support. I'm not sure I'll ever add that.

-Pie

Quote:
Originally Posted by Lime2K View Post
Here's a bug report, _and_ the fix for it (it was a really easy one)

PieLRF wasn't recognizing &lsquo; and &rsquo; as single quotes.

Here's the original code <in textconvert.py>, under <def convert_html_ampersands>

Code:
The original code:
if html_quotes :
	line = line.replace("&ldquo;", u"\u201C") # OPEN
	line = line.replace("&rdquo;", u"\u201D") # CLOSE
	line = line.replace("“", u"\u201C")
	line = line.replace("”", u"\u201D")
	line = line.replace("‘", u"\u2018")
	line = line.replace("’", u"\u2019")
else :
	line = line.replace("&ldquo;", u"\"")
	line = line.replace("&rdquo;", u"\"")
	line = line.replace("“", u"\"")
	line = line.replace("”", u"\"")
	line = line.replace("‘", u"'")
	line = line.replace("’", u"'")
#endif 

Replace with:
if html_quotes :
	line = line.replace("&ldquo;", u"\u201C") # OPEN
	line = line.replace("&rdquo;", u"\u201D") # CLOSE
	line = line.replace("“", u"\u201C")
	line = line.replace("”", u"\u201D")
	line = line.replace("&lsquo;", u"\u2018")
	line = line.replace("&rsquo;", u"\u2019")
	line = line.replace("‘", u"\u2018")
	line = line.replace("’", u"\u2019")
else :
	line = line.replace("&ldquo;", u"\"")
	line = line.replace("&rdquo;", u"\"")
	line = line.replace("“", u"\"")
	line = line.replace("”", u"\"")
	line = line.replace("&lsquo;", u"'")
	line = line.replace("&rsquo;", u"'")
	line = line.replace("‘", u"'")
	line = line.replace("’", u"'")
#endif
This keeps the correct behavior of --html-quotes.

I fixed it in my personal copy already, but am posting it here so it makes it into the official releases as well.

Enjoy!
EatingPie is offline   Reply With Quote
Old 09-16-2007, 03:58 AM   #88
phrodod
Enthusiast
phrodod began at the beginning.
 
phrodod's Avatar
 
Posts: 43
Karma: 28
Join Date: Aug 2007
Device: Sony Reader PRS-500
I have a strange bug to report. When paragraphs are joined together, somehow the space inserted between lines is a non-expanding space, while regular lines are expanding spaces. This makes the text look very strange if a lot of space gets added (e.g., at large size) in a line like:
Code:
This    line    of    text    has strange    spacing    in    it!
I can't see where the offending code is, so I can't offer a fix. Sorry!

Phrodod

Last edited by phrodod; 09-25-2007 at 01:49 PM. Reason: Make spaces appear as they do in the text
phrodod is offline   Reply With Quote
Old 09-24-2007, 09:30 PM   #89
yargoflick
Enthusiast
yargoflick is on a distinguished road
 
yargoflick's Avatar
 
Posts: 31
Karma: 60
Join Date: Mar 2007
Device: Sony Reader
Problem with <verse> tag

Here there, I'm trying out the <verse> tag, but she's not doing what I thought.

I thought the following:
Code:
<verse>
black against<br>
white sky<br>
from dropped tree<br>
</verse>
would give me:
Code:
black against
     white sky
     from dropped tree
but instead I get all left justified:
Code:
black against
white sky
from dropped tree
If I put a normal paragraph, one with no forced line breaks(<br>), between <verse> tags then it DOES get nicely verse indented.

Is there a way to specify line breaks and get verse indenting?

Oh, I tried using <pre> </pre> tags around the poems, settling for monospaced but properly formatted, but pielrf just ignores them.
yargoflick is offline   Reply With Quote
Old 09-25-2007, 12:54 AM   #90
Lime2K
Member
Lime2K began at the beginning.
 
Lime2K's Avatar
 
Posts: 21
Karma: 10
Join Date: May 2007
Device: Sony Reader (PRS-500)
What <verse> does is called a 'hanging indent'. If the line is longer than a screen width, it does wrap, like this:

Code:
                    | end of page
text
text
text text really long
     amount of text
text
It's designed for song lyrics, and stuff. To get what you want (assuming normal text is indented) you need to add <justified></justified> to the first line, and leave the others alone. If you want all the text centered, you could add a <blockquote> around it as well, like this:

Code:
<blockquote>
<justified>black against</justified>
     white sky
     from dropped tree
</blockquote>
Hope this helps!
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 04:29 AM.


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