- document.edoc.getroot().set('data-cover-width', str(cover.width))
- document.edoc.getroot().set('data-cover-height', str(cover.height))
+ if cover is True:
+ cover = WLCover
+ the_cover = cover(document.book_info)
+ document.edoc.getroot().set('data-cover-width', str(the_cover.width))
+ document.edoc.getroot().set('data-cover-height', str(the_cover.height))
+ if the_cover.uses_dc_cover:
+ if document.book_info.cover_by:
+ document.edoc.getroot().set('data-cover-by', document.book_info.cover_by)
+ if document.book_info.cover_source:
+ document.edoc.getroot().set('data-cover-source', document.book_info.cover_source)