05-01-2007, 04:06 PM | #31 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Released 0.3.18 which fixes Xenophon's bug, adds support for <blockquote> elements (See text section in updated demo file) and allows control of link recursion.
|
05-02-2007, 12:28 PM | #32 |
curmudgeon
Posts: 1,481
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
Thanks, Kovid. No more crashes; the converter seems to work fine. I did notice one bit of odd behaviour, however. The resulting lrf files have distinctly different behaviour when it comes to page turning. The lrf file made from the example html source I sent you takes about 10 seconds per page turn on the Reader. Others take the usual one second. But ALL of them take 10+ seconds to page forward onto the page that contains all the links from the ToC!
Any idea what's going on with this? I'd be very interested in an upgrade to html2lrf that makes the Reader happier with these files. Would it help if I also sent you the source for one of the ones that didn't slow down? Xenophon |
Advert | |
|
05-02-2007, 01:02 PM | #33 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Interestingly, I found that with the grantville gazette, a reset of the reader made the page turns all 1s again. The TOC page turns seem to be simply because the reader can't handle the large number of links. Do you have an LRF file with a large number of links in the TOC that has a quick page turn to the TOC?
One thing that was different about the grantville gazette was the large number of empty <a name> elements throughout the text. These get mapped to empty textblocks by html2lrf. Perhaps the resulting large number of textblocks is what the reader finds hard to handle. I'll look into that. Last edited by kovidgoyal; 05-02-2007 at 01:12 PM. |
05-02-2007, 03:37 PM | #34 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I've added a patch to svn that fixes the slowdowns for me. Can you test it and let me know? Thanks. There was also a fix that will cause the TOC elements to link to the page before the actual chapter...this is the correct behavior as per the grantville HTML file. There was a bug in previous verions that caused the TOC links to point to the first page of the chapter.
Last edited by kovidgoyal; 05-02-2007 at 03:39 PM. |
05-02-2007, 05:13 PM | #35 | |
curmudgeon
Posts: 1,481
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
Quote:
I'll let you know if the version in svn fixes the slowdown. |
|
Advert | |
|
05-02-2007, 05:34 PM | #36 | |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
05-02-2007, 05:37 PM | #37 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Released v 0.3.19 with support for creating the external TOC (I've reversed my earlier decision not to do this upon further consideration). This version also contains completely reworked code for handling <a name> elements. This code hasn't been as thoroughly tested as the original, so there may be bugs.
|
05-02-2007, 07:38 PM | #38 |
curmudgeon
Posts: 1,481
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
The svn version does, in fact, fix the slowdown. I'll report the page-break issue to Arnold Bailey (Baen's web guy), and perhaps get a fix from that end, instead. Thanks for the quick turn-around on the fixes.
Xenophon |
05-02-2007, 11:28 PM | #39 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Glad to hear it...I read a lot of ebooks converted from HTML so getting this tool shipshape is a high priority for me.
|
05-03-2007, 05:24 PM | #40 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Released 0.3.20 with bug fixes too numerous to elaborate. An upgrade is highly recommended.
|
05-05-2007, 10:45 AM | #41 |
curmudgeon
Posts: 1,481
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
For those of you converting Baen html files with html2lrf, here's a little trick that may help.
First, process the original html to remove the anchors for each paragraph that are used to show paragraph numbers on mouse over. Then, remove the "page-break-before:" from the css declaration in each htm file. Then, remove the "onmouseover" entry from each paragraph element in the htm files. Only after all of that should you convert it to an lrf. The result of these changes is a clean lrf file, with no slow-downs in page changes. In addition, when you open it for the first time on the reader, it only takes about 10 seconds to process (as compared to the minute-or-so needed when you convert the original html). I've created a little sed script that automates all of this. Its contents are: Code:
s/<a id=\"p[0-9]*\" name=\"p[0-9]*\"><\/a>// s/ onmouseover=\"PNo([0-9]*)\"// s/page-break-before:// Code:
sed -i old -f yoursedfilehere *.htm Those of you on non-Unix hosts are on your own for how to do this, but perhaps this'll give you a good start. Xenophon |
05-05-2007, 11:58 AM | #42 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Cool I'll add this to html2lrf as a commandline option so people can use it in windows too. Could you open a bug and attach the sed script so I dont forget.
Thanks. EDIT: I doubt removing the onmouseover is neccessary since it's essentially ignored by html2lrf |
05-05-2007, 05:01 PM | #43 |
Fanatic
Posts: 574
Karma: 138556
Join Date: May 2006
Device: PRS505
|
When I try to run the program in Ubuntu Feisty i get:
Code:
dave@aurora:~$ prs500 info Traceback (most recent call last): File "/usr/bin/prs500", line 8, in <module> load_entry_point('libprs500==0.3.20', 'console_scripts', 'prs500')() File "/usr/lib/python2.5/site-packages/libprs500-0.3.20-py2.5.egg/libprs500/cli/main.py", line 235, in main File "/usr/lib/python2.5/site-packages/libprs500-0.3.20-py2.5.egg/libprs500/cli/main.py", line 100, in info File "/usr/lib/python2.5/site-packages/libprs500-0.3.20-py2.5.egg/libprs500/prs500.py", line 164, in run_session File "/usr/lib/python2.5/site-packages/libprs500-0.3.20-py2.5.egg/libprs500/prs500.py", line 260, in open libprs500.errors.DeviceBusy: Device is in use by another application: Underlying error:Failed to set device configuration to: 2. Error code: -1 Any help? |
05-06-2007, 04:55 PM | #44 | |
Grumpy Old Man
Posts: 267
Karma: 30194
Join Date: Jul 2006
Location: L.A., Euro ex-pat
Device: Kobo, Nook Classic,Color,ST/Glow, iRex DR1000, Sony 505, REB1100&1200
|
Quote:
sudo prs500 info (Using SUDO will require you to enter your password once for that session) |
|
05-06-2007, 05:16 PM | #45 |
Grumpy Old Man
Posts: 267
Karma: 30194
Join Date: Jul 2006
Location: L.A., Euro ex-pat
Device: Kobo, Nook Classic,Color,ST/Glow, iRex DR1000, Sony 505, REB1100&1200
|
First, Thanks for html2lrf!
Second, is there some sort of simple, comprehensive feature list of the supported HTML anywhere? I couldn't find one on the website. I plan on writing a little program that outputs HTML files, and I want to be sure I would be able to upload that result to the PRS500. For instance which version of (X)HTML? CSS support? Anchor support? Image support, what formatting works? etc. Any pointers would be appreciated to cut down the trial-and-error to a minimum... Tia, P. (BTW, Kovid, my browser keeps having an issue with your site's certificate: "Website certified by an unknown Authority"... Could not verify this certificate for unknown reasons) Edit: Nevermind, just went through it again and saw that you issued it yourself. No problem. Noticed you're a local of the greater LA area like myself ) Last edited by allovertheglobe; 05-06-2007 at 05:20 PM. |
Tags |
html2lrf, libprs500 |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
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 |