X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/dce4cbe605cb926b5583f7ddd325704b527e7e5c..24721591455e048cffca365384e6759daae05916:/src/catalogue/models/book.py diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index ddea117eb..eb87f10e7 100644 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -449,6 +449,17 @@ class Book(models.Model): parse_dublincore=parse_dublincore, meta_fallbacks=meta_fallbacks) + def wldocument2(self): + from catalogue.import_utils import ORMDocProvider + from librarian.document import WLDocument + doc = WLDocument( + self.xml_file.path, + provider=ORMDocProvider(self) + ) + doc.meta.update(self.cover_info()) + return doc + + @staticmethod def zip_format(format_): def pretty_file_name(book):