From: Radek Czajka Date: Fri, 17 Sep 2010 15:48:38 +0000 (+0200) Subject: epub: remove reduntant toc entry, fix validation X-Git-Tag: 1.7~270 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/02e90dceef6fef2a804512d5df984c6f9b5af174?hp=223fd8f247b4a588d263afaf798dca4cb9ffa639 epub: remove reduntant toc entry, fix validation --- diff --git a/librarian/epub.py b/librarian/epub.py index c25ba19..84a745f 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -349,13 +349,13 @@ def transform(provider, slug, output_file=None, output_dir=None): 'version="2005-1">' \ '' \ 'Strona tytułowa' \ - '' \ - 'Początek utworu' \ '') nav_map = toc_file[-1] toc, chunk_counter = transform_file(input_xml) - toc_counter = toc.write_to_xml(nav_map, 3) # we already have 2 navpoints + if not toc.children: + toc.add(u"Początek utworu", 1) + toc_counter = toc.write_to_xml(nav_map, 2) # Last modifications in container files and EPUB creation if len(annotations) > 0: