本文整理汇总了Python中calibre.customize.Plugin.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Plugin.__init__方法的具体用法?Python Plugin.__init__怎么用?Python Plugin.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类calibre.customize.Plugin
的用法示例。
在下文中一共展示了Plugin.__init__方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from calibre.customize import Plugin [as 别名]
# 或者: from calibre.customize.Plugin import __init__ [as 别名]
def __init__(self, *args, **kwargs):
Plugin.__init__(self, *args, **kwargs)
self.running_a_test = False # Set to True when using identify_test()
self._isbn_to_identifier_cache = {}
self._identifier_to_cover_url_cache = {}
self.cache_lock = threading.RLock()
self._config_obj = None
self._browser = None
self.prefs.defaults['ignore_fields'] = []
for opt in self.options:
self.prefs.defaults[opt.name] = opt.default
示例2: __init__
# 需要导入模块: from calibre.customize import Plugin [as 别名]
# 或者: from calibre.customize.Plugin import __init__ [as 别名]
def __init__(self, *args, **kwargs):
_Plugin.__init__(self, *args, **kwargs)
self.width, self.height = self.screen_size
fsizes = list(self.fsizes)
self.fkey = list(self.fsizes)
self.fsizes = []
for (name, num), size in izip(FONT_SIZES, fsizes):
self.fsizes.append((name, num, float(size)))
self.fnames = dict((name, sz) for name, _, sz in self.fsizes if name)
self.fnums = dict((num, sz) for _, num, sz in self.fsizes if num)
self.width_pts = self.width * 72./self.dpi
self.height_pts = self.height * 72./self.dpi
示例3: __init__
# 需要导入模块: from calibre.customize import Plugin [as 别名]
# 或者: from calibre.customize.Plugin import __init__ [as 别名]
def __init__(self, *args):
Plugin.__init__(self, *args)
self.report_progress = DummyReporter()