fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
5e225c0
)
publish epub/mobi with images
author
Jan Szejko
<j-sz@o2.pl>
Wed, 16 Mar 2016 10:14:01 +0000
(11:14 +0100)
committer
Jan Szejko
<j-sz@o2.pl>
Wed, 16 Mar 2016 10:14:01 +0000
(11:14 +0100)
lib/librarian
patch
|
blob
|
history
src/catalogue/fields.py
patch
|
blob
|
history
diff --git
a/lib/librarian
b/lib/librarian
index
3acdb97
..
6d1ec86
160000
(submodule)
--- a/
lib/librarian
+++ b/
lib/librarian
@@
-1
+1
@@
-Subproject commit
3acdb97ed96bb54a04c031e017c2059f86db57e4
+Subproject commit
6d1ec864ca2ec59a74afe0f025134fdd18e4f5b5
diff --git
a/src/catalogue/fields.py
b/src/catalogue/fields.py
index
1a3a3b5
..
5b49307
100644
(file)
--- a/
src/catalogue/fields.py
+++ b/
src/catalogue/fields.py
@@
-130,7
+130,15
@@
class BuildPdf(BuildEbook):
class BuildEpub(BuildEbook):
@staticmethod
def transform(wldoc, fieldfile):
- return wldoc.as_epub(cover=True)
+ return wldoc.as_epub(cover=True, ilustr_path=gallery_path(wldoc.book_info.url.slug))
+
+
+@BuildEbook.register('mobi')
+@task(ignore_result=True)
+class BuildMobi(BuildEbook):
+ @staticmethod
+ def transform(wldoc, fieldfile):
+ return wldoc.as_mobi(cover=True, ilustr_path=gallery_path(wldoc.book_info.url.slug))
@BuildEbook.register('html')