![]() |
#466 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Sep 2007
Device: None
|
Oh, that's it! Awesome! Great tool, thanks for your help!
|
![]() |
![]() |
![]() |
#467 |
Time Vortex Manipulator
![]() Posts: 30
Karma: 10
Join Date: Aug 2007
Location: Greece
Device: Sony Reader
|
|
![]() |
![]() |
![]() |
#468 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
|
Converting BD files
Hey, I've been using Book Designer for a while to create Sony Reader Content, and I think it's a nice program, but it looks like I'll get better results with html2lrf for inline graphics and tables, etc. I'd like to be able to convert my HTML0 files output by BD using libprs500, and I'm having a few problems. I've looked around and was a bit surprised that this doesn't seem to have come up on the forum.
Here are my questions. I can't figure out a chapter-regex that will pick up BD style chapter tags (I've included an example below). Can anyone help me with that? <SPAN id=title><DIV align=center><B><FONT color=#001950>PROLOGUE</FONT></B></DIV> </SPAN> Another issue is trying to get page breaks to work the way I want. BD replaces the <HR> tag with page breaks, and I use that to control pagination (BD by default also does chapter page breaks, but I turn that off so that I can have more control over the output). With libprs500, I can use page-break-before-tag=HR and that controls the page break fine, but it displays the Horizontal Rule, which I don't want. Is there any workaround that would create the manual page break, but not include the visible line? Finally (for now at least), BD creates empty lines as <DIV align=justify> </DIV> and HTML2LRF seems to not respect that empty line- the line below is pushed up. Is there any way I can force this to show as an empty line. |
![]() |
![]() |
![]() |
#469 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Hmm none of those issues have easy solutions. What I will do is make a preprocessing option for BD that will automatically replace the problematic html with HTML that html2lrf processes. Can you send me a couple of example HTML0 files.
Also you may try saving the HTML0 files as HTML in BD and then running html2lrf over them. |
![]() |
![]() |
![]() |
#470 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
|
BD Content
Quote:
I've attached a zip file with an HTML file generated from BD that will give you the basics. I'm sure it is pretty self explanatory, but if you have any questions, let me know. If you need some bigger files for a more complete test, let me know and I will see if I have anything public domain with some good formatting to post. Last edited by maggotb0y; 10-04-2007 at 09:24 PM. |
|
![]() |
![]() |
![]() |
#471 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Hmm tell me if the following mapping is correct
<span id=title> --> <h1> <span id=subtitle> --> <h2> What about lower levels of headings? subsubtitle, etc? That way you can match chapters on either h1 or h2. <hr> --> <span style="page-break-after:always" /> I will probably modify html2lrf's handling of the div tag to take care of the blank lines. Incidentally, the way BD uses the id attribute is puzzling. According to the HTML spec ids should be unique, is there some reason vvv chose to use the id attribute rather than the class attribute, which is a much more natural fit? |
![]() |
![]() |
![]() |
#472 | ||
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
|
Quote:
Quote:
Thanks a lot for your work on this, I'm sure you'll earn quite a few converts. Let me know when you have something ready for testing- I'm excited to start running my collection through this! |
||
![]() |
![]() |
![]() |
#473 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If anyone wants to donate to get kividgoyal a new 505 so he can port libprs500 to it then please have a look at https://www.mobileread.com/forums/showthread.php?t=14496 and give give give.
|
![]() |
![]() |
![]() |
#474 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Oct 2007
Device: prs500
|
I'm having trouble converting html
I've been trying for a couple weeks to get a website page to lrf format using libprs500 in Linux (ubuntu). The page is simply a text handbook, so I thought it would be simple.
Well it hasn't really worked for me yet. i've tried saving html converting to pdf then pdf2lrf, no go. Tried html2lrf, again no good. Could somebody convert show me how to convert this page : http://www.gentoo.org/doc/en/handboo...l=1#book_part1 Then let me know how you did it. Thanks, One Confused Reader |
![]() |
![]() |
![]() |
#475 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
When you say no good, what do you mean exactly? The simplest way to convert an online website into an LRF file is
web2lrf --url "http://www.gentoo.org/doc/en/handboo...l=1#book_part1" EDIT: In your case the correct commandline is web2lrf --url "http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?style=printable&full=1#book_part1" -r 0 Last edited by kovidgoyal; 10-05-2007 at 07:33 AM. |
![]() |
![]() |
![]() |
#476 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Oct 2007
Device: prs500
|
I'm sorry for the lack of detail with "no good," but I've tried so many times that I've forgotten exact problems.
I ran the command exactly as you suggested web2lrf --url "http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?style=printable&full=1#book_part1" -r 0 When I try to view in Sony reader, upon opening the file, it either hangs on "Formatting..." or it reboots the unit. So,I tried to use lrfviewer to view the created lrf. Below are my errors upon viewing: Quote:
Last edited by glenn69; 10-05-2007 at 04:16 PM. |
|
![]() |
![]() |
![]() |
#477 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
This is because the PyQt on your distribution is not correctly installed. The LRF file should work fine if you copy it to the SONY reader or view it using the Connect software.
|
![]() |
![]() |
![]() |
#478 | |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
![]() |
![]() |
![]() |
#479 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Oct 2007
Device: prs500
|
According to Synaptic I have the following pyqt's installed:
Python-qt3 Python-qt4 Python-qt4-dev Python-qt4-gl Python-qt4-sql Is there something else I need ? |
![]() |
![]() |
![]() |
#480 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It's a version problem. You should either install SPI and PyQt by hand or wait for gutsy.
|
![]() |
![]() |
![]() |
Tags |
html2lrf, libprs500 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change font of header for LRF Output on PRS 505 | duckbill | Calibre | 3 | 05-15-2010 11:07 AM |
Pissed off with LRF formatting: LRF/LRS clean tool? | grimborg | LRF | 8 | 02-15-2010 01:14 PM |
Fonts for LRF output | krischik | Calibre | 1 | 10-03-2009 05:01 AM |
CBZ > LRF (LRF>HTML/MOBI????) | sideburnt | Calibre | 4 | 09-15-2009 06:44 AM |
libprs500 Issues Converting .LIT to .LRF - .LRF crashes everything | vasbinde | Calibre | 6 | 02-14-2008 12:16 PM |