Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-25-2008, 01:05 AM   #736
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: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Can you open a ticket about that with a test case, I'll try to fix it for the next release.
kovidgoyal is offline   Reply With Quote
Old 08-25-2008, 12:27 PM   #737
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by kovidgoyal View Post
Can you open a ticket about that with a test case, I'll try to fix it for the next release.
I would, but I am getting "DatabaseError: database disk image is malformed" at the moment.

A very minimal demo file is here:
http://www.pepak.net/tmp/demo.zip
pepak is offline   Reply With Quote
Old 08-25-2008, 01:18 PM   #738
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: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm sqlite database corruption. Should be fixed now. Please try again.
kovidgoyal is offline   Reply With Quote
Old 08-28-2008, 09:11 AM   #739
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
I feel like a complete idiot, but I simply can't figure out how does chapter-detection and toc-generation work. I am still using the HTML code described earlier:
Code:
<h2 id="chapter-10">The Attack</h2>
<p>Something attacked you. You are dead.</p>
I tried many different combinations of --chapter-regex, --chapter-attr, --add-chapters-to-toc, but no go - I never get a TOC. Unfortunately, the documentation is rather sparse on chapter detection. I took it to mean:

1) --add-chapters-to-toc is required if I want the TOC.

2) --chapter-regex=. should, as I understand it, match any h1-h6 tag whose content ("The Attack", in my case) is at least one character long.

3) --chapter-attr=h2,id,chapter should match any <h2 id="chapteranything">

But it does not. If I use all three or just 1 and 2 or 1 and 3, I always get the same result: no TOC items at all.
pepak is offline   Reply With Quote
Old 08-28-2008, 11:22 AM   #740
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: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Is there an OPF file in the same directory as the html file?
kovidgoyal is offline   Reply With Quote
Old 08-28-2008, 02:07 PM   #741
tkirke
Junior Member
tkirke began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2008
Device: Sony
html2lrf and some unicode chars in LRF

Hi,
I've used calibre's html2lrf to convert a html utf-8 file to LRF.
When I use calibre's viewer, the document renders correctly. However with Sony's viewer or on the Ereader itself I can't see some characters. For example
unicode 233 (é) is OK, but 257 (ā) is not.
I've tried embedding a font using html2lrf but haven't gotten this to work. Is this a conversion problem or an Ereader issue? How do I get around this?
Thanks
tkirke is offline   Reply With Quote
Old 08-28-2008, 03:06 PM   #742
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: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
font embedding is a chancy thing. You have to try with various fonts until you hit a good combination.
kovidgoyal is offline   Reply With Quote
Old 08-28-2008, 03:19 PM   #743
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by kovidgoyal View Post
Is there an OPF file in the same directory as the html file?
No. Only the HTML file.
pepak is offline   Reply With Quote
Old 08-28-2008, 03:48 PM   #744
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: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
And was the exact commandline you used?
kovidgoyal is offline   Reply With Quote
Old 08-28-2008, 08:22 PM   #745
tkirke
Junior Member
tkirke began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2008
Device: Sony
Quote:
Originally Posted by kovidgoyal View Post
font embedding is a chancy thing. You have to try with various fonts until you hit a good combination.
thanks. If anyone else has got this to work please let me know.
Tony
tkirke is offline   Reply With Quote
Old 08-29-2008, 03:12 AM   #746
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by kovidgoyal View Post
And was the exact commandline you used?
Well, I really don't get it: today it worked with the same command line:
Code:
html2lrf.exe --no-links-in-toc --chapter-attr=h2,id,. --force-page-break-before-tag=h2 --add-chapters-to-toc --lrs "demo.htm"
I still don't get it how to choose which tags should be considered headers (--chapter-regex is quite unclear ("The regular expression used to detect chapter titles. It is searched for in heading tags (h1-h6). Defaults to chapter|book|appendix" - what exactly is searched? Can I limit it to h2 only or will it always work on h[1-6]?) and --chapter-attr will only work with chapters which DO have an attribute (apparently it can't be used to detect "all <h2> no matter what attributes are used").
pepak is offline   Reply With Quote
Old 08-29-2008, 10:19 AM   #747
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: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yeah the chapter detection options are a bit of a mess (mainly for legacy reasons). In the next release of calibre, you'll be able to set the attribute value to none to match tags with no attributes.
kovidgoyal is offline   Reply With Quote
Old 09-29-2008, 01:51 AM   #748
guardianx
Junior Member
guardianx began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2007
Device: sony ereader
i have an html file which is about 14 mb.. the program crash all the times when i try to open it with calibre.. the htlm file is all text.. it is the penal law for new
guardianx is offline   Reply With Quote
Old 09-29-2008, 02:19 AM   #749
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: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
zip it up and then add it.
kovidgoyal is offline   Reply With Quote
Old 09-29-2008, 01:48 PM   #750
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
html2lrf is able to convert a <hr> tag to horizontal line across the whole display. Is there a way to get the same result using CSS only? "border: solid 1px black" didn't work when I tried it, but maybe there's another way of forcing html2lrf to produce a solid horizontal line?

(Actually, a box around a certain element would be even better, but I suspect LRF format doesn't support that.)
pepak is offline   Reply With Quote
Reply

Tags
html2lrf, libprs500


Forum Jump

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


All times are GMT -4. The time now is 03:45 PM.


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