build_txt=options.get('build_txt'),
build_pdf=options.get('build_pdf'),
build_mobi=options.get('build_mobi'),
build_txt=options.get('build_txt'),
build_pdf=options.get('build_pdf'),
build_mobi=options.get('build_mobi'),
for ebook_format in Book.ebook_formats:
if os.path.isfile(file_base + '.' + ebook_format):
getattr(book, '%s_file' % ebook_format).save(
for ebook_format in Book.ebook_formats:
if os.path.isfile(file_base + '.' + ebook_format):
getattr(book, '%s_file' % ebook_format).save(
File(file(file_base + '.' + ebook_format)))
if verbose:
print "Importing %s.%s" % (file_base, ebook_format)
File(file(file_base + '.' + ebook_format)))
if verbose:
print "Importing %s.%s" % (file_base, ebook_format)
time.strftime('%Y-%m-%d %H:%M:%S',
time.localtime(wait_until)), wait_until - time.time())
time.strftime('%Y-%m-%d %H:%M:%S',
time.localtime(wait_until)), wait_until - time.time())
for dir_name in directories:
if not os.path.isdir(dir_name):
print self.style.ERROR("%s: Not a directory. Skipping." % dir_name)
for dir_name in directories:
if not os.path.isdir(dir_name):
print self.style.ERROR("%s: Not a directory. Skipping." % dir_name)
except (Book.AlreadyExists, Picture.AlreadyExists):
print self.style.ERROR('%s: Book or Picture already imported. Skipping. To overwrite use --force.' %
file_path)
except (Book.AlreadyExists, Picture.AlreadyExists):
print self.style.ERROR('%s: Book or Picture already imported. Skipping. To overwrite use --force.' %
file_path)