fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rel
[librarian.git]
/
src
/
librarian
/
builders
/
epub.py
diff --git
a/src/librarian/builders/epub.py
b/src/librarian/builders/epub.py
index
6fc0e74
..
8544846
100644
(file)
--- a/
src/librarian/builders/epub.py
+++ b/
src/librarian/builders/epub.py
@@
-11,8
+11,6
@@
import librarian.epub
from librarian.fonts import strip_font
from librarian.fonts import strip_font
-
-
class Xhtml:
def __init__(self):
self.element = etree.XML('''<html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" href="style.css" type="text/css"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>WolneLektury.pl</title></head><body/></html>''')
class Xhtml:
def __init__(self):
self.element = etree.XML('''<html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" href="style.css" type="text/css"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>WolneLektury.pl</title></head><body/></html>''')
@@
-61,8
+59,6
@@
class Builder:
def forget_fragment(self, name):
del self.cursors[name]
def forget_fragment(self, name):
del self.cursors[name]
-
-
@property
def base_url(self):
if self._base_url is not None:
@property
def base_url(self):
if self._base_url is not None:
@@
-80,6
+76,7
@@
class Builder:
class EpubBuilder(Builder):
file_extension = 'epub'
isbn_field = 'isbn_epub'
class EpubBuilder(Builder):
file_extension = 'epub'
isbn_field = 'isbn_epub'
+ orphans = True
def __init__(self, *args, **kwargs):
self.chars = set()
def __init__(self, *args, **kwargs):
self.chars = set()
@@
-303,6
+300,7
@@
class EpubBuilder(Builder):
def add_toc(self):
item = epub.EpubNav()
def add_toc(self):
item = epub.EpubNav()
+ item.add_link(href='style.css', rel='stylesheet', type='text/css')
self.output.add_item(item)
self.output.spine.append(item)
self.output.add_item(epub.EpubNcx())
self.output.add_item(item)
self.output.spine.append(item)
self.output.add_item(epub.EpubNcx())