class_docstr: Builder that outputs epub files.
  
  It creates the metainfo files container.opf, toc.ncx, mimetype, and
  META-INF/container.xml.  Afterwards, all necessary files are zipped to an
  epub file.
class_docstr_tok: ["Builder","that","outputs","epub","files",".","It","creates","the","metainfo","files","container.opf",",","toc.ncx",",","mimetype",",","and","META-INF\/container.xml",".","Afterwards",",","all","necessary","files","are","zipped","to","an","epub","file","."]
docstr: Create a dictionary with all metadata for the content.opf
  file properly escaped.
code: def content_metadata(self) -> dict[str, Any]:
      """Create a dictionary with all metadata for the content.opf
      file properly escaped.
      """
      if (
          source_date_epoch := os.getenv("SOURCE_DATE_EPOCH")
      ) is not None:
          time_tuple = time.gmtime(int(source_date_epoch))
      else:
          time_tuple = time.gmtime()
  
      metadata: dict[str, Any] = {}
      metadata["title"] = html.escape(self.config.epub_title)
      metadata["author"] = html.escape(self.config.epub_author)
      metadata["uid"] = html.escape(self.config.epub_uid)
      metadata["lang"] = html.escape(self.config.epub_language)
      metadata["publisher"] = html.escape(self.config.epub_publisher)
      metadata["copyright"] = html.escape(self.config.epub_copyright)
      metadata["scheme"] = html.escape(self.config.epub_scheme)
      metadata["id"] = html.escape(self.config.epub_identifier)
      metadata["date"] = html.escape(
          time.strftime("%Y-%m-%d", time_tuple)
      )
      metadata["manifest_items"] = []
      metadata["spines"] = []
      metadata["guides"] = []
      return metadata
  
imports: from __future__ import annotations
  import html
  import os
  import re
  import time
  from os import path
  from typing import TYPE_CHECKING, Any, NamedTuple
  from urllib.parse import quote
  from zipfile import ZIP_DEFLATED, ZIP_STORED, ZipFile
  from docutils import nodes
  from docutils.utils import smartquotes
  from sphinx import addnodes
  from sphinx.builders.html import BuildInfo, StandaloneHTMLBuilder
  from sphinx.locale import __
  from sphinx.util import logging
  from sphinx.util.display import status_iterator
  from sphinx.util.fileutil import copy_asset_file
  from sphinx.util.osutil import copyfile, ensuredir, relpath
label_desc: Use image node_id 21 for calling the EpubBuilder obj's underlying member method code with example usage: obj.content_metadata() and returns: metadata