本文整理汇总了Python中docutils.transforms.frontmatter.DocInfo方法的典型用法代码示例。如果您正苦于以下问题:Python frontmatter.DocInfo方法的具体用法?Python frontmatter.DocInfo怎么用?Python frontmatter.DocInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类docutils.transforms.frontmatter
的用法示例。
在下文中一共展示了frontmatter.DocInfo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_transforms
# 需要导入模块: from docutils.transforms import frontmatter [as 别名]
# 或者: from docutils.transforms.frontmatter import DocInfo [as 别名]
def get_transforms(self):
transforms = standalone.Reader.get_transforms(self)
# We have PEP-specific frontmatter handling.
transforms.remove(frontmatter.DocTitle)
transforms.remove(frontmatter.SectionSubTitle)
transforms.remove(frontmatter.DocInfo)
transforms.extend([peps.Headers, peps.Contents, peps.TargetNotes])
return transforms
示例2: get_transforms
# 需要导入模块: from docutils.transforms import frontmatter [as 别名]
# 或者: from docutils.transforms.frontmatter import DocInfo [as 别名]
def get_transforms(self):
return readers.Reader.get_transforms(self) + [
references.Substitutions,
references.PropagateTargets,
frontmatter.DocTitle,
frontmatter.SectionSubTitle,
frontmatter.DocInfo,
references.AnonymousHyperlinks,
references.IndirectHyperlinks,
references.Footnotes,
references.ExternalTargets,
references.InternalTargets,
references.DanglingReferences,
misc.Transitions,
]
示例3: get_transforms
# 需要导入模块: from docutils.transforms import frontmatter [as 别名]
# 或者: from docutils.transforms.frontmatter import DocInfo [as 别名]
def get_transforms(self):
"""Get default transforms without DocInfo."""
transforms = standalone.Reader.get_transforms(self)
transforms.remove(frontmatter.DocInfo)
return transforms