This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}"/> | |
{{ metatags }} | |
{%- block htmltitle %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
from sphinx.builders.epub import EpubBuilder | |
# We subclass EpubBuilder and re-define build_epub to call | |
# clean_html_file_for_ibooks. This function replaces all instances of | |
# the SPAN tag to SAMP. It's uglish but it works. A better way would | |
# be to change sphinx.writers.html to emmit the SAMP tag in the first | |
# place, but it seems even more difficult to do. |