tools

epubaker.tools.relative_path(in_dir, to_file_path)

if you got file with path “text/cover.xhtml” and it links to “image/cover.png”

Parameters:
  • in_dir – “text”
  • to_file_path – “image/cover.png”
Returns:

”../image/cover.png”

epubaker.tools.identify_mime(binary)
Parameters:binary – bytes html
Returns:mime
epubaker.tools.w3c_utc_date(date_time=None)
Parameters:date_time – instance of datetime, default is datetime.utcnow()
Returns:like ‘CCYY-MM-DDThh:mm:ssZ’