+ footer_text = [
+ 'Information about the resource',
+ 'Publisher: %s' % self.dc('publisher'),
+ 'Rights: %s' % self.dc('rights'),
+ 'Intended audience: %s' % self.dc('audience'),
+ self.dc('description'),
+ 'Resource prepared using MIL/PEER editing platform.',
+ 'Source available at %s' % ctx.source_url,
+ ]
+ footer_wrap = deepcopy(wrap_tmpl)
+ footer_body = footer_wrap.find('//*[@id="book-text"]')
+ for line in footer_text:
+ footer_line = etree.Element('p')
+ footer_line.text = line
+ footer_body.append(footer_line)
+ manifest.append(manifest.makeelement(OPFNS('item'), attrib={
+ 'id': 'footer',
+ 'href': "footer.html",
+ 'media-type': 'application/xhtml+xml',
+ }))
+ spine.append(spine.makeelement(OPFNS('itemref'), attrib={
+ 'idref': 'footer',
+ }))
+ zip.writestr('OPS/footer.html', etree.tostring(footer_wrap, method='html'))