← Back to team overview

calibre-devs team mailing list archive

Re: lp:~llasram/calibre/oeb2lit ready for merge

 

oeb.py currently errors out if the OPF file contains items in the manifest 
that dont exist. 

Traceback:

Traceback (most recent call last):
  File "/usr/local/bin/any2lit", line 8, in <module>
    load_entry_point('calibre==0.4.115', 'console_scripts', 'any2lit')()
  File "/home/kovid/work/calibre/src/calibre/ebooks/lit/from_any.py", line 56, 
in main
    any2lit(opts, args[1])
  File "/home/kovid/work/calibre/src/calibre/ebooks/lit/from_any.py", line 46, 
in any2lit
    oeb2lit(opts, opf)
  File "/home/kovid/work/calibre/src/calibre/ebooks/lit/writer.py", line 726, 
in oeb2lit
    lit.dump(f)
  File "/home/kovid/work/calibre/src/calibre/ebooks/lit/writer.py", line 335, 
in dump
    self._dump()
  File "/home/kovid/work/calibre/src/calibre/ebooks/lit/writer.py", line 351, 
in _dump
    self._build_sections()
  File "/home/kovid/work/calibre/src/calibre/ebooks/lit/writer.py", line 456, 
in _build_sections
    self._build_data()
  File "/home/kovid/work/calibre/src/calibre/ebooks/lit/writer.py", line 474, 
in _build_data
    data = item.data
  File "/home/kovid/work/calibre/src/calibre/ebooks/lit/oeb.py", line 233, in 
fget
    data = self._loader(self.href)
  File "/home/kovid/work/calibre/src/calibre/ebooks/lit/oeb.py", line 97, in 
read
    with open(urlunquote(path), 'rb') as f:
IOError: [Errno 2] No such file or directory: 
'/tmp/calibre_0.4.115_jWXCwH_any2lit/oeb/content/resources/_cover_.jpg'

Also html2epub now splits on page breaks by default, so please add an option 
to oeb2lit to disable splitting.

Kovid.

On Friday 12 December 2008 18:59:07 Marshall T. Vandegrift wrote:
> Well, with a few caveats.  I used launchpad to do a merge request, but I
> don't know if that resulted in you seeing anything or not, Kovid.  And as
> the revison log indicates, it was a few commits premature anyway.
>
> I've reaplaced the ctypes LZX compressor with a Python/C type, cleaned up
> the license strings etc, implemented setting the various cover-image
> metadata properties, and had a file tested on the Windows Mobile version of
> MSReader.  W00t.
>
> Outstanding issues:
>
>   - Still no anchor hashing, so only 6 anchors per file or links into that
> file don't work.
>   - No CSS/markup transformation to the subset MSReader groks.
>   - Logging is via the 'print' statement. Should that be using the logging
> system I saw in some other parts of calibre?
>   - Not so much yet in the way of error-handling/-recover.  Arcane stack
> traces for everyone!
>   - Is there any reason calibre doesn't use package-relative module
> imports? That would allow e.g. calibre.ebooks.lit to provide LitReader and
> LitWriter, hiding the underlying mess.
>
> That's all I can think of for now.
>
> Fish,
>
> -Marshall
>
>
> !DSPAM:3,4943250375721636283973!

-- 
_____________________________________

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