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)

    注意到{TT1}$的存在 类似的东西。 [标记]

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)

  • 初次发行 [标记]

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java更改计算器不显示更改   java计算沿相对对角线的点偏移   当我用javac编写几个。java文件,我有一些“重复类”错误,但我在代码中找不到错误   java Trim ArrayList根据位置设置一个数字   java使用Optional映射和返回未使用的数据   java在28字节分配的Android上内存不足   java如何在一个组件中创建实例,而在另一个组件中使用实例?   java Apache Maven:找不到符号,目标发布错误无效(NetBeans支持Mule插件)   java任何序列化“javax”的方法。艾尔。LambdaExpression`?   java使用一个单词将一个单词分成两行   java为什么ClassCastException只在运行时发生?   java如何在JavaFX中重新启动计时器?   java如何从cucumber数据表更新Json有效负载中的多个字段   http Java请求仅在以下情况下工作   java如何使用Struts 2.0更改web应用程序的会话超时?   不按java网格宽度动态设置   java ask错误加载抽绳   java Jersey 2状态代码在HttpServletResponseWrapper中不可见