本文整理匯總了Python中sphinx.builders.Builder.init方法的典型用法代碼示例。如果您正苦於以下問題:Python Builder.init方法的具體用法?Python Builder.init怎麽用?Python Builder.init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sphinx.builders.Builder
的用法示例。
在下文中一共展示了Builder.init方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: init
# 需要導入模塊: from sphinx.builders import Builder [as 別名]
# 或者: from sphinx.builders.Builder import init [as 別名]
def init(self):
# type: () -> None
Builder.init(self)
self.env.set_versioning_method(self.versioning_method,
self.env.config.gettext_uuid)
self.tags = I18nTags()
self.catalogs = defaultdict(Catalog) # type: DefaultDict[unicode, Catalog]
示例2: init
# 需要導入模塊: from sphinx.builders import Builder [as 別名]
# 或者: from sphinx.builders.Builder import init [as 別名]
def init(self):
Builder.init(self)
errors = False
if not self.config.omegat_translated_path:
self.info(red("'omegat_translated_path' should not be empty."))
errors = True
if not self.config.omegat_project_path:
self.info(red("'omegat_project_path' should not be empty."))
errors = True
if self.config.omegat_translated_path not in self.config.locale_dirs:
self.info(red("'omegat_translated_path' should be in locale_dirs."))
errors = True
if not self.config.language:
self.info(red("'language' should be set."))
errors = True
if errors:
self.info(red(" -> Please check conf.py"))
raise RuntimeError("lack setting")
示例3: init
# 需要導入模塊: from sphinx.builders import Builder [as 別名]
# 或者: from sphinx.builders.Builder import init [as 別名]
def init(self):
Builder.init(self)
self.catalogs = defaultdict(Catalog)
示例4: init
# 需要導入模塊: from sphinx.builders import Builder [as 別名]
# 或者: from sphinx.builders.Builder import init [as 別名]
def init(self):
# type: () -> None
Builder.init(self)
self.tags = I18nTags()
self.catalogs = defaultdict(Catalog) # type: defaultdict[unicode, Catalog]
示例5: init
# 需要導入模塊: from sphinx.builders import Builder [as 別名]
# 或者: from sphinx.builders.Builder import init [as 別名]
def init(self):
Builder.init(self)
self.tags = I18nTags()
self.catalogs = defaultdict(Catalog)