calibre-devs team mailing list archive
-
calibre-devs team
-
Mailing list archive
-
Message #00116
Conversion pipeline
Hi all,
calibre's new conversion pipeline is gradually taking shape in pluginize.
Here's a brief outline of the code so far:
CLI or GUI
|
|
Plumber (ebooks.conversion.plumber)
/ | \
/ | \
Input plugin - OEBBook - Output plugin
The conversion pipeline has three stages,
Input which accepts the input file and returns an OPF file
OEBBook which does the various format independent transforms
And Output which does the output format dependent transforms and returns the
output file.
The Plumber class is responsible for creating the pipeline and pushing things
from one stage to the next. See Plumber.run
@Marshall
I want oeb.base, oeb.transforms to support parse_cache which is dictionary mapping absolute paths
of XHTML/CSS files to their parsed representations in memory, wich are lxml root
objects/cssutils stylesheets. If an entry is present in parse_cache, oeb.*
should use it instead of re-parsing and if it parses something it should put it
into parse_cache.
Since the first step is going to be CSS flattenning, oeb.flatcss should find all
css and create a single CSSStylesheet (merging any stylesheets in parse_cache)
and put it into parse_cache under the key 'css'.
If you've got the time to do this, go ahead, if not let me know and I shall start
hacking on oeb.
Also what sort of options/ui is needed for your font rescaling code?
Kovid.
--
_____________________________________
Kovid Goyal
http://www.kovidgoyal.net
http://calibre.kovidgoyal.net
_____________________________________
Attachment:
pgpDXWuq60K6B.pgp
Description: PGP signature
Follow ups