X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/5bc29f19f308610c944d63597962fb3b0f468c54..d329e7e5c88a9445e10083536ae1549e6fc1a1be:/librarian/parser.py?ds=sidebyside diff --git a/librarian/parser.py b/librarian/parser.py index d330a72..fb2f986 100644 --- a/librarian/parser.py +++ b/librarian/parser.py @@ -5,7 +5,6 @@ # from librarian import ValidationError, NoDublinCore, ParseError, NoProvider from librarian import RDFNS, IOFile -from librarian.styles.wolnelektury.cover import WLCover from librarian import dcparser from xml.parsers.expat import ExpatError @@ -193,7 +192,7 @@ class WLDocument(object): # Converters def as_html(self, *args, **kwargs): - from librarian import html + from librarian import pyhtml as html return html.transform(self, *args, **kwargs) def as_text(self, *args, **kwargs): @@ -205,8 +204,8 @@ class WLDocument(object): return epub.transform(self, *args, **kwargs) def as_pdf(self, *args, **kwargs): - from librarian import pdf - return pdf.transform(self, *args, **kwargs) + from librarian import pypdf + return pypdf.EduModulePDFFormat(self).build(*args, **kwargs) def as_mobi(self, *args, **kwargs): from librarian import mobi @@ -218,6 +217,7 @@ class WLDocument(object): def as_cover(self, cover_class=None, *args, **kwargs): if cover_class is None: + from librarian.styles.wolnelektury.cover import WLCover cover_class = WLCover return cover_class(self.book_info, *args, **kwargs).output_file()