from calibre.ebooks.epub.fix import ePubFixer, InvalidEpub
from calibre.utils.date import parse_date, strptime
class Epubcheck(ePubFixer):
name = 'Workaround epubcheck bugs'
def short_description(self):
return _('Workaround epubcheck bugs')
short_description = property(short_description)
def long_description(self):
return _('Workarounds for bugs in the latest release of epubcheck. epubcheck reports many things as errors that are not actually errors. epub-fix will try to detect these and replace them with constructs that epubcheck likes. This may cause significant changes to your epub, complain to the epubcheck project.')
long_description = property(long_description)
def fix_name(self):
return 'epubcheck'
fix_name = property(fix_name)
def fix_pubdates(self):
dirtied = False
opf = self.container.opf
for dcdate in opf.xpath('//dc:date', namespaces = {