fnp
/
librarian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
ecc4f5c
)
EPUB: Support for subchapters without chapters.
author
Radek Czajka
<rczajka@rczajka.pl>
Fri, 18 Dec 2020 09:22:34 +0000
(10:22 +0100)
committer
Radek Czajka
<rczajka@rczajka.pl>
Fri, 18 Dec 2020 09:22:34 +0000
(10:22 +0100)
src/librarian/epub.py
patch
|
blob
|
history
diff --git
a/src/librarian/epub.py
b/src/librarian/epub.py
index
c286903
..
35766b8
100644
(file)
--- a/
src/librarian/epub.py
+++ b/
src/librarian/epub.py
@@
-327,6
+327,18
@@
def transform_chunk(chunk_xml, chunk_no, annotations, empty=False,
)
)
elif element.tag in ('naglowek_podrozdzial', 'naglowek_scena'):
+ if not toc:
+ toc.append(
+ (
+ epub.Link(
+ "part%d.xhtml" % chunk_no,
+ " ",
+ "part%d" % chunk_no
+ ),
+ []
+ )
+ )
+
subnumber = len(toc[-1][1])
toc[-1][1].append(
epub.Link(