本文整理汇总了Python中book.Book.directory方法的典型用法代码示例。如果您正苦于以下问题:Python Book.directory方法的具体用法?Python Book.directory怎么用?Python Book.directory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类book.Book
的用法示例。
在下文中一共展示了Book.directory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: from book import Book [as 别名]
# 或者: from book.Book import directory [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()