Skip to content

Instantly share code, notes, and snippets.

View maidis's full-sized avatar
🐢
Progressing

Anıl Özbek maidis

🐢
Progressing
View GitHub Profile
<!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 %}
@maidis
maidis / epub2.py
Created April 20, 2013 22:59 — forked from kroger/epub2.py
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.