2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
3
from __future__ import with_statement
6
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
7
__docformat__ = 'restructuredtext en'
9
from calibre.ebooks.oeb.base import OEB_DOCS, XPNSMAP
11
class LinearizeTables(object):
13
def linearize(self, root):
14
for x in root.xpath('//h:table|//h:td|//h:tr|//h:th',
18
def __call__(self, oeb, context):
19
for x in oeb.manifest.items:
20
if x.media_type in OEB_DOCS:
21
self.linearize(x.data)