本文整理匯總了Python中book.Book.export方法的典型用法代碼示例。如果您正苦於以下問題:Python Book.export方法的具體用法?Python Book.export怎麽用?Python Book.export使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類book.Book
的用法示例。
在下文中一共展示了Book.export方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: len
# 需要導入模塊: from book import Book [as 別名]
# 或者: from book.Book import export [as 別名]
import os
import sys
import time
from book import Book
if len(sys.argv) < 4:
print ("Usage: %s <manga title> <export directory> <source directory...>" % sys.argv[0])
sys.exit(1)
book = Book()
book.title = sys.argv[1]
book.directory = sys.argv[2]
directories = sys.argv[3:]
print('Sanity check:')
print('Manga title: %s' % book.title)
print('Export directory: %s' % os.path.join(unicode(book.directory), unicode(book.title)))
for dir in directories:
print('Source directory: %s' % unicode(dir))
print('Press Ctrl-C to abort. Beginning conversion in 5 seconds...')
time.sleep(5)
# if we didn't get interrupted, begin conversion
print('Beginning conversion...')
book.addImageDirs(directories)
book.export()