Transmogrifier蓝图打印管道项密钥
transmogrify.print的Python项目详细描述
简介
注意
从1.3版开始,transmogrifier通过名为collective.transmogrifier.sections.logger的蓝图提供了类似的功能。
这个Transmogrifier蓝图基于collective.transmogrifier.sections.tests.PrettyPrinter,任何人都可以通过创建这样的实用程序在项目中使用它:
<utility component="collective.transmogrifier.sections.tests.PrettyPrinter" name="print" />
然后在管道中添加一个部分,如下所示:
[transmogrifier] pipeline = … print [print] blueprint = print
transmogrify.print与上述方法相比有两个优点:
- It adds the utility for you
- It allows you to specify a ^{tt4}$ parameter to print individual keys. If no key is provided, it prints the entire item.
安装
确保在项目中需要transmogrify.print,例如:
from setuptools import setup setup( name='migrate', py_modules=['migrate'], install_requires=[ 'plone.app.transmogrifier', 'transmogrify.filesystem', 'transmogrify.print', ] )
然后您可以在管道中使用它,例如:
[transmogrifier] pipeline = data constructor # schema print [constructor] blueprint = collective.transmogrifier.sections.constructor [data] blueprint = transmogrify.filesystem directory = silly_content file-type = Document [print] blueprint = transmogrify.print keys = _path [schema] blueprint = plone.app.transmogrifier.atschemaupdater
有关工作示例,请参见:https://github.com/aclark4life/silly_content_import。
更改日志
0.6.0(2014-02-04)
- 为多个键停止多个打印 [Djowett]
0.5.0(2011-08-30)
- 修复入口点,现在指向transmogrify [标记]
0.4.0(2011-07-31)
0.3.0(2011-07-31)
- 修复蓝图名称,应该是唯一的,如transmogrify.print (而不是print)。 [标记]
- 显示在自述文件中使用的keys。 [标记]
0.2.0(2011-07-31)
- 修复包数据,setup.py缺少include_package_data。 [标记]
0.1.0(2011-07-31)
- 初次发行 [标记]