← Back to team overview

calibre-devs team mailing list archive

Re: Changes to OEBBook

 

On Fri, Apr 10, 2009 at 7:23 PM, Kovid Goyal <kovid@xxxxxxxxxxxxxx> wrote:

> 1) OEBBook assumes that the OPF is at the top level of the directory structure.

> The other possible solution is to require InputPlugins to ensure that their OPF
> files are at the top level. For most input plugins this is (I believe) automatically the
> case, however it will require extra work for the HTML and EPUB input plugins.
> I think this is the best solution.

I think a hybrid solution would be easiest / most sensible.  Because
Windows drives are actualy disjoint namespaces, we can't ensure that
all filesystem references ultimately share a common root directory to
begin with.  I think it should be the responsibility of input plugins
to ensure that all filenames are within a single filesystem namespace,
then the OEBBook can normalize the book-internal absolute paths to a
common root directory.

> 2) OEBBook actually writes out *everything* if the input OPF does not specify a
> cover (in order to render the "first page" as a cover).

I intended that a placeholder for implementing a
QtAbstractFilesystemHandler which would allow all the Qt voodoo to
operate directly on the contents of an OEBBook.  That IMHO is the
right solution (as long as we're using Qt for HTML and SVG rendering).

-Marshall



Follow ups

References