Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-16-2007, 01:08 PM   #76
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,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The most flexible way to control what goes into the table of contents is to use an OPF file to specify a separate html file that contains only those links that you want in the TOC
kovidgoyal is offline   Reply With Quote
Old 11-20-2007, 07:43 AM   #77
shoggot
Junior Member
shoggot began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2007
Device: sony prs-505
Side note - I've noticed that a file with closing <p> tags (</p>) take on the order of 12x time to process via html2lrf.exe - 3.2MB file, has ~14k <p> tags. About 15 seconds without the close tags, about 4 minutes with.
shoggot is offline   Reply With Quote
Advert
Old 11-20-2007, 11:46 AM   #78
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,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Thats an interesting observation. One way to figure out why that may be is to run html2lrf with the --verbose switch. It will then write the result of the pre-processed HTML to a file. It may be that the preprocessed HTML is more complex in the second case. In any case, I would appreciate it if you could send me this file.
kovidgoyal is offline   Reply With Quote
Old 11-20-2007, 02:09 PM   #79
shoggot
Junior Member
shoggot began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2007
Device: sony prs-505
Mmm, the file itself contains material covered under copyright... but as I've replicated the results with three separate files now, it should be easy enough to replicate.

The files were each over 3MB (as .htm files), and contained only the bare essential tags, so could be replicated like so, under bash:

Quote:
echo "<html><head></head><body></body>" > foo.htm
num=1
while [[ $num -lt 50000 ]];do
echo "<p>abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 </p>" >> foo.htm
num=$(($num+1))
done
echo "</body></html>" >> foo.htm
And this is the commandline used against the result:
./html2lrf.exe --title="barfoo" --author="foobar" --font-delta=-2 --left-margin=5 --right-margin=5 --top-margin=5 foo.htm

Followed by a
Quote:
sed -e s/"<\/p>"//g foo.htm > foo2.htm
And run the commandline against that. Output seems to be identical, or within a few bytes either way. On-reader appearance is identical, anyway - just processing times.

I'm running a truncated version of that test file with verbose options, to see the results:

Well, the result's interesting (temp files). Snipping for space, but you'll see the diff (and I have no idea why it should have any effect.)
With </p> tags:
Quote:
<html><head></head><body></body>
<p>abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 </p>
<p>abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 </p>
...
<p>abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 </p>
</html>
Without </p> tags:
Quote:
<html><head></head><body></body>
<p>abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
</p><p>abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
</p><p>abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
</p><p>abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
</p></html>
The closed </body> tag is due to my malforming the input html, but there you go.

If you really have to have the original file, I guess we'll make it happen in the name of progress, but I'd prefer to bypass that step.
shoggot is offline   Reply With Quote
Old 11-20-2007, 02:18 PM   #80
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,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That test case is fine, I don't need the original file. I'll look into it.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-20-2007, 02:40 PM   #81
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,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The basic reason is that the HTML "<p>phrase </p>\n<p>" becomes a P object containing a single text object, then a text object and then another <p> object while "<p>phrase \n<p>" becomes two P objects, each containing a single text object. Not much I can do about that I'm afraid, as that is the correct object representation of the HTML

EDIT: Incidentally you should use the --base-font-size option instead of --font-delta
kovidgoyal is offline   Reply With Quote
Old 11-23-2007, 11:51 PM   #82
MSWallack
Right, Except When Wrong
MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.
 
MSWallack's Avatar
 
Posts: 353
Karma: 3968525
Join Date: Aug 2007
Location: Indianapolis
Device: Kindle Oasis 3 (sometimes iPad Mini).
Author Author

I'm not sure if I've found a problem or if I'm getting the expected result. I finally connected my 505 to libprs500 (v0.4.24). In the table of contents of the 505, it appears that every book that I've added by using libprs has the author listed as Author Author (e.g., Arthur C. Clarke Arthur C. Clarke). Is this simply showing the Author field followed by the Author sort field or is something odd happening?
MSWallack is offline   Reply With Quote
Old 11-24-2007, 12:17 PM   #83
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,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm not sure why that should be happening. Can you save one these files to the disk and run lrf-meta on them.
kovidgoyal is offline   Reply With Quote
Old 11-24-2007, 12:31 PM   #84
MSWallack
Right, Except When Wrong
MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.
 
MSWallack's Avatar
 
Posts: 353
Karma: 3968525
Join Date: Aug 2007
Location: Indianapolis
Device: Kindle Oasis 3 (sometimes iPad Mini).
Author (kana) is Clarke, Arthur C.
Author is Arthur C. Clarke
MSWallack is offline   Reply With Quote
Old 11-24-2007, 01:21 PM   #85
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,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
OK I see you've opened a bug report, I'll look at it when I return.
kovidgoyal is offline   Reply With Quote
Old 11-25-2007, 06:23 AM   #86
spooky69
Stats:
spooky69 can extract oil from cheesespooky69 can extract oil from cheesespooky69 can extract oil from cheesespooky69 can extract oil from cheesespooky69 can extract oil from cheesespooky69 can extract oil from cheesespooky69 can extract oil from cheesespooky69 can extract oil from cheesespooky69 can extract oil from cheese
 
spooky69's Avatar
 
Posts: 233
Karma: 1189
Join Date: Nov 2007
Device: Sony PRS-505
Hey, I plan on purchasing the PRS-505 within the next couple of months and I'd just like to say that I'm glad that there is somebody so dedicated to making the device as good as possible. I feel a lot more confident about my purchase because of this. Keep up the good work!
spooky69 is offline   Reply With Quote
Old 12-03-2007, 02:49 PM   #87
pcboy70
Junior Member
pcboy70 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2007
Device: PRS-505
Just joined - problem

I just joined this forum (just got a PRS-505). Looks like a great source of info.

I just installed the current version of libprs500 on my MacBook Pro running OS X.5.1 and it seems to mostly work (haven't tried everything yet but I did try the RSS feed from the BBC and it worked well) but - I can see my library, reader and my SD card but not my MS card (both are installed in the reader). Am I missing a step or does this need to be addressed?

Looking forward to using the software since Sony doesn't seem to care about me and my Mac!

pcboy70
pcboy70 is offline   Reply With Quote
Old 12-03-2007, 02:55 PM   #88
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,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
libprs500 only supports one card at a time. That's not going to change.
kovidgoyal is offline   Reply With Quote
Old 12-11-2007, 02:07 PM   #89
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,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just to let everyone know, as far as I know, all outstanding issues with the 505 have been resolved.
kovidgoyal is offline   Reply With Quote
Old 12-11-2007, 02:42 PM   #90
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,931
Karma: 128903250
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 kovidgoyal View Post
Just to let everyone know, as far as I know, all outstanding issues with the 505 have been resolved.
Very nice!
JSWolf is offline   Reply With Quote
Reply

Tags
libprs500, prs-505


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
libprs500 tommy still Calibre 2 02-09-2008 10:55 AM
Using libprs500 jerryleejr Calibre 2 01-28-2008 12:29 AM
Using Libprs500 for 505 JeffASonyReader Calibre 17 01-21-2008 09:34 AM
Help!!! libprs500 MountainMan Calibre 11 11-13-2007 11:25 PM
libprs500 and 505 carchase Sony Reader 6 10-28-2007 03:06 PM


All times are GMT -4. The time now is 08:48 PM.


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