From: Radek Czajka Date: Mon, 24 Sep 2012 12:43:39 +0000 (+0200) Subject: Merge remote-tracking branch 'mgorny/fb2' X-Git-Tag: 1.7~144 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/cba76114f031d47c93e1af947a350230cbef0a1f?hp=1ffcf32a8d795681f54bd125ca45e908da5ed3fb Merge remote-tracking branch 'mgorny/fb2' --- diff --git a/librarian/fb2.py b/librarian/fb2.py index b0ad410..78707a9 100644 --- a/librarian/fb2.py +++ b/librarian/fb2.py @@ -8,6 +8,7 @@ from copy import deepcopy from lxml import etree from librarian import functions, OutputFile +from .epub import replace_by_verse functions.reg_substitute_entities() @@ -30,6 +31,10 @@ def transform(wldoc, verbose=False, style_filename = os.path.join(os.path.dirname(__file__), 'fb2/fb2.xslt') style = etree.parse(style_filename) + replace_by_verse(document.edoc) + result = document.transform(style) return OutputFile.from_string(unicode(result).encode('utf-8')) + +# vim:et diff --git a/librarian/fb2/poems.xslt b/librarian/fb2/poems.xslt index d276ebf..bbc9407 100644 --- a/librarian/fb2/poems.xslt +++ b/librarian/fb2/poems.xslt @@ -25,29 +25,15 @@ - - - + - - - + + - - - - - - - - - - - - + +