← Back to team overview

calibre-devs team mailing list archive

Re: Branch lp:~llasram/calibre/oeb2lit

 

Hi Marshall,

A few (minor) comments on your code.

1) Why have you chosen to not use the cssselector function from lxml instead 
of writing your own stylizer class?

2) Have you tested lzxcomp.py on windows? You might need to set 
Structure._pack_ = 1 on windows.

3) Do you really need a PRS505 profile since it is (and will remain) identical 
to the PRS500? 

4) IIRC, you said that MSReader doesn't make use of the TOC. Is it worthwhile 
inserting a TOC into the book as HTML?

5) I'm guessing you have still to flesh out the command line interface? Or are 
there no options controlling oeb2lit? I'm assuming the code correctly handles 
covers specified in the OPF file (via the guide element)?

6) Please rename the class Toc to TOC, to be consistent with calibre naming 
conventions. 

7) Please remove the /usr/bin/python2.5 header from the .py files (or atleast 
use python instead of python2.5, I just spent 3 days migrating calibre to 
python 2.6 :-). You should also add __license__ and __copyright__ 
declarations.

Kovid.


On Tuesday 09 December 2008 22:05:55 Marshall T. Vandegrift wrote:
> On Tue, Dec 9, 2008 at 3:13 PM, Kovid Goyal <kovid@xxxxxxxxxxxxxx> wrote:
> > You can probably get it to upload to launchpad with a bzr push
>
> That actually is what I'd tried the second time when it claimed success.
> The earlier FUBAR branch must have confused it.  In any case, the branch
> exists now!  And there was much rejoicing...
>
> And the branch has the "ugly-printing" code I said I was going to try.
> To all appearances, it works great.  It works so well, in fact, that
> after ugly-printing LIT-derived markup which doesn't pretty-print well
> with the default lxml parser, I am able to pretty-print it cleanly.  So
> perhaps the solution to pretty-printing LIT markup is first
> ugly-printing it.
>
> On a down note, I just figured out -- and I'm not sure why it took so
> long -- that MSReader supports an almost unbelievably limited subset of
> CSS.  The key limitation is that it supports absolutely no contextual
> selectors: one tag, class, or ID is all you get.  Full-and-complete LIT
> support will require munging all CSS information into a single class per
> element which specifies absolutely everything.  I'm perfectly willing to
> leave that for later though.
>
> -Marshall
>
> _______________________________________________
> Mailing list: https://launchpad.net/~calibre-devs
> Post to     : calibre-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~calibre-devs
> More help   : https://help.launchpad.net/ListHelp
>
> !DSPAM:3,493f5c5875723535313183!

-- 
_____________________________________

Kovid Goyal  MC 452-48
California Institute of Technology
1200 E California Blvd
Pasadena, CA 91125

cell  : +01 626 390 8699
office: +01 626 395 6595 (449 Lauritsen)
email : kovid@xxxxxxxxxxxxxxxxxx
web   : http://www.kovidgoyal.net
_____________________________________




Follow ups

References