Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-08-2007, 12:15 PM   #496
maggotb0y
Connoisseur
maggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheese
 
Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
Quote:
Originally Posted by kovidgoyal View Post
You need to run make

make -C src/libprs500/gui2/
As always, you know your stuff. I built the new SVN under the VM image and tested converting some documents and they're not quite right (quite possible I don't know the appropriate switches- the only one i used is --book-designer). Here's what I've noticed on the first round:
  • <SPAN ID=title> should become a chapter title, the chapter isn't being generated
  • images aren't included
  • <SPAN id=subtitle>should be in the document, but it isn't
So I've created another test document for you (this time with images) and included the document the LRF that book designer generates for your comparison.
Attached Files
File Type: zip a fancy book.zip (55.1 KB, 262 views)
maggotb0y is offline   Reply With Quote
Old 10-08-2007, 02:04 PM   #497
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,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Bug in the BD regexp fixed in svn
kovidgoyal is offline   Reply With Quote
Advert
Old 10-08-2007, 09:46 PM   #498
maggotb0y
Connoisseur
maggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheese
 
Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
Kovid-

The formatting is getting better now, here are some new observations (and one question)

1)images in the lrf generated from the test book i posted aren't centered
2) the pagebreak (<hr>) before the first chapter in the sample posted doesn't get picked up correctly by html2lrf
3) images in some other books aren't getting picked up right. In another document this image:
<DIV align=center><IMG hspace=0 src="chapter1.jpg" align=baseline border=0></DIV>
isn't picked up
4) Would you prefer I enter these types of comments as tickets on your trac page? and do you prefer 1 ticket per comment or one "round-up" ticket?

Thanks again as always.
maggotb0y is offline   Reply With Quote
Old 10-08-2007, 09:58 PM   #499
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,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The image centering is simply because in html2lrf images are usually inline, so they aren't centred. I could add some code to the preprocessor to generate centered images.

Yeah, tickets help me keep track of things.
kovidgoyal is offline   Reply With Quote
Old 10-08-2007, 10:22 PM   #500
maggotb0y
Connoisseur
maggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheese
 
Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
Jeez, you're fast.

Okay, from now on I will enter comments as tickets.

One thing I forgot to ask. Is it possible to have the first paragraph of every chapter use drop caps? I have looked around a bit, but I don't see that documented (seems like it is basically supposed to be in the atributes of the par in the HTML?) It would be a nice feature when converting from another format to be able to specify that as an option.

Also, in what file or group of files does the BD pre-processor lie? I've not used Python before, but I am a developer and I'm fairly comfortable with regex's so I may be able to offer more useful suggestions if I know where to look.

Also, how does drop caps handle an open quote or an open smart quote before the first letter?

Finally (for now), is there a guide to getting a python environment up and running under Windows that would be approprate for compiling libprs500? If not, I'll do my best to get things running and write a guide for others to follow.
maggotb0y is offline   Reply With Quote
Advert
Old 10-08-2007, 10:41 PM   #501
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,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There isn't an option to enable drop caps, open a ticket and I'll get it done.
it uses the css pseudo-selector first-letter. And at the moment, it doesnt handle quotes. Add that to the ticket and I'll implement it.

All the code (except for table handling) for html2lrf is in the file html/convert_from.py look for the variable BOOK_DESIGNER

There isn't a guide for windows. It's a pretty laborious process in which you have to install Unix toolchain to compile dependencies and so on.

EDIT: Actually now that i think of it having a dropcaps on every paragraph would be pretty weird.
kovidgoyal is offline   Reply With Quote
Old 10-08-2007, 11:05 PM   #502
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,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by maggotb0y View Post
Kovid-

The formatting is getting better now, here are some new observations (and one question)

1)images in the lrf generated from the test book i posted aren't centered
2) the pagebreak (<hr>) before the first chapter in the sample posted doesn't get picked up correctly by html2lrf
3) images in some other books aren't getting picked up right. In another document this image:
<DIV align=center><IMG hspace=0 src="chapter1.jpg" align=baseline border=0></DIV>
isn't picked up
4) Would you prefer I enter these types of comments as tickets on your trac page? and do you prefer 1 ticket per comment or one "round-up" ticket?

Thanks again as always.
All these issues are now fixed in svn except 3 which worked for me. There's probably more context needed to reproduce the bug, or one of the recent changes fixed it.
kovidgoyal is offline   Reply With Quote
Old 10-09-2007, 09:20 AM   #503
maggotb0y
Connoisseur
maggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheese
 
Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
Quote:
Originally Posted by kovidgoyal View Post
EDIT: Actually now that i think of it having a dropcaps on every paragraph would be pretty weird.
That would be very weird indeed- I'm proposing the first regular paragraph following a chapter break. I will open a ticket.
maggotb0y is offline   Reply With Quote
Old 10-12-2007, 12:20 PM   #504
Fallen angel
Time Vortex Manipulator
Fallen angel began at the beginning.
 
Fallen angel's Avatar
 
Posts: 30
Karma: 10
Join Date: Aug 2007
Location: Greece
Device: Sony Reader
Thank you, kovidgoyal, the new version works. I just didn't have much time to try out html2lrf, so I would like to ask if it supports unicode ...
Fallen angel is offline   Reply With Quote
Old 10-12-2007, 12:47 PM   #505
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,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yeah it does. see demo attached to first post. You have to embed a unicode enabled font for the characters to actualy show up.
kovidgoyal is offline   Reply With Quote
Old 10-13-2007, 01:39 PM   #506
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,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
version 0.4.9 is on its way to the servers. There was an extensive refactoring of html2lrf's internals to support two new features:
1) --use-spine
Reads the spine information from opf files to determine the order in which individual HTML files should be appended to the LRF
2) --override-css Allows you to specify CSS that will override the CSS loaded through stylesheets and <style> elements in the HTML file. It will not override CSS found in the tags themselves via the style attribute.

Because of the refactoring there may be regressions in this version. If you find any please report them.
kovidgoyal is offline   Reply With Quote
Old 10-13-2007, 04:11 PM   #507
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: 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
See https://www.mobileread.com/forums/sho...126#post106126 for what happened when I ran lit2lrf on Autumn.lit.
JSWolf is offline   Reply With Quote
Old 10-13-2007, 04:39 PM   #508
lj69
Member
lj69 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Aug 2007
Device: SONY
i try the new version but seem it not support the foreign language , it turn out with all of sign and stuff even when i embedding
html2lrf --serif-family="C:\Windows\Fonts, VNI-Aptima" untitled.html but does not work
can some one help me convert this to lrf and show me how to work with this please,
here is the font :http://www.megaupload.com/?d=YWPI1FL5
and the pdf file:http://www.megaupload.com/?d=OD3T7A02
please, thank you
lj69 is offline   Reply With Quote
Old 10-13-2007, 06:44 PM   #509
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,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
pdf2lrf --serif-family "C:\Windows\Fonts, Times New Roman" myfile.pdf should work. I doubt the font you mentioned is a proper unicode font. See the attached LRF.
Attached Files
File Type: lrf lhrx01(1).lrf (691.2 KB, 246 views)
kovidgoyal is offline   Reply With Quote
Old 10-13-2007, 06:51 PM   #510
lj69
Member
lj69 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Aug 2007
Device: SONY
Quote:
Originally Posted by kovidgoyal View Post
pdf2lrf --serif-family "C:\Windows\Fonts, Times New Roman" myfile.pdf should work. I doubt the font you mentioned is a proper unicode font. See the attached LRF.
the attached file that you just gave me is unreadable, and the pdf file have font VNI-Aptima in pdf file have is the fist link megaupload have in there, i try install unicode font in my window exactly with the one in pdf file but not working either
but thanks anyway for the great progam,
anyway to fix that
lj69 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:07 AM.


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