fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Off by one error
[wolnelektury.git]
/
apps
/
catalogue
/
fields.py
diff --git
a/apps/catalogue/fields.py
b/apps/catalogue/fields.py
index
0e02ff9
..
68aaa40
100644
(file)
--- a/
apps/catalogue/fields.py
+++ b/
apps/catalogue/fields.py
@@
-105,13
+105,22
@@
class BuildTxt(BuildEbook):
class BuildPdf(BuildEbook):
@staticmethod
def transform(wldoc, fieldfile):
class BuildPdf(BuildEbook):
@staticmethod
def transform(wldoc, fieldfile):
- return wldoc.as_pdf(morefloats=settings.LIBRARIAN_PDF_MOREFLOATS)
+ return wldoc.as_pdf(morefloats=settings.LIBRARIAN_PDF_MOREFLOATS,
+ cover=True)
def build(self, fieldfile):
BuildEbook.build(self, fieldfile)
clear_cache(fieldfile.instance.slug)
def build(self, fieldfile):
BuildEbook.build(self, fieldfile)
clear_cache(fieldfile.instance.slug)
+@BuildEbook.register('epub')
+@task(ignore_result=True)
+class BuildEpub(BuildEbook):
+ @staticmethod
+ def transform(wldoc, fieldfile):
+ return wldoc.as_epub(cover=True)
+
+
@BuildEbook.register('html')
@task(ignore_result=True)
class BuildHtml(BuildEbook):
@BuildEbook.register('html')
@task(ignore_result=True)
class BuildHtml(BuildEbook):