import kepub as epub, http://wiki.mobileread.com/wiki/Kepub
This commit is contained in:
parent
3ba16900e6
commit
b33d066322
4 changed files with 7 additions and 2 deletions
|
|
@ -180,6 +180,8 @@ class UploadHandler(tornado.web.RequestHandler):
|
|||
while os.path.exists(import_name):
|
||||
n += 1
|
||||
name, extension = filename.rsplit('.', 1)
|
||||
if extension == 'kepub':
|
||||
extension = 'epub'
|
||||
import_name = os.path.join(prefix_imported, '%s [%d].%s' % (name, n, extension))
|
||||
with open(import_name, 'wb') as fd:
|
||||
fd.write(upload.body)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue