"url": model['Url'],
}
-# name=files[]
-# filename
-# content-type
-# response: json
-# success: true
-# model.Url
-
def send_book(self, book, changes=None):
wlbook = book.wldocument(librarian2=True, changes=changes)
meta = wlbook.meta
cover = LabelMarquiseCover(meta, width=1200).output_file()
- epub_file = EpubBuilder(cover=MarquiseCover, fundraising=fundraising).build(wlbook).get_file()
- mobi_file = MobiBuilder(cover=MarquiseCover, fundraising=fundraising).build(wlbook).get_file()
+ epub_file = EpubBuilder(
+ cover=MarquiseCover,
+ fundraising=fundraising,
+ base_url='file://' + book.gallery_path() + '/'
+ ).build(wlbook).get_file()
+ mobi_file = MobiBuilder(
+ cover=MarquiseCover,
+ fundraising=fundraising,
+ base_url='file://' + book.gallery_path() + '/'
+ ).build(wlbook).get_file()
book_data = {
"Title": meta.title,
}
if meta.isbn_html:
isbn = meta.isbn_html
- if isbn.upper().startswith('ISBN '):
+ if isbn.upper().startswith(('ISBN ', 'ISBN-')):
isbn = isbn[5:]
isbn = isbn.strip()
book_data['Isbn'] = isbn
self.legimichunkpublish_set.order_by('change__chunk__number')
]
legimi.send_book(self.book, changes=changes)
+ legimi.edit_sale(self.book)
except Exception:
self.status = 110
self.error = traceback.format_exc()