plone的附加组件,用于获取有关内容的警报

collective.contentalerts的Python项目详细描述


collective.contentalerts

每当在内容对象上找到一个(两个自定义列表)单词时获取警报, 成为任何内容类型(灵巧或评论)的对象。

可用于:

  • 中等:用作黑名单。
  • 突出显示:用作白名单。

其主要思想是利用plone.a p p.contentrules的能力来检查用户生成的特定单词的内容。

在此基础上,可以触发常规操作: 发送电子邮件,通知用户,应用工作流转换…

第二个想法是,根据单词在一个或另一个列表中的位置,可以对内容执行不同的操作。

搜索位置

collective.contentalerts搜索注释文本或 文本(用于基于灵巧性的内容类型)。

独立使用

虽然plone中的主要集成是通过plone.app.contentrules条件进行的, collective.contentalerts 也可以用作独立实用程序。

使用提供的实用程序( collective.contentalerts.interfaces.ialert )。

文档

最终用户的完整文档可以在"docs"文件夹中找到。

安装

通过将collective.contentalerts添加到构建中来安装它:

[buildout]

 ...

 eggs =
     collective.contentalerts

然后运行"bin/buildout"

升级说明

版本1.0及以下

如果要从0.7升级到更高版本,则需要执行一个手动步骤。

在1.0版中,停止词的单列被分为 不充分词 禁止词

由于无法猜测前一个列表应该映射到哪个列表, 不提供自动迁移。

然后需要编写升级步骤。

请参见下面的示例,了解如何将前一个列表迁移到新的 禁止使用的单词 列表:

from plone import api
from plone.registry.interfaces import IRegistry
from zope.component import getUtility

# safe the stop words on the old location
old_setting = 'collective.contentalerts.interfaces.IStopWords.stop_words'
current_forbidden_words = api.portal.get_registry_record(name=old_setting)

# update registry
setup = api.portal.get_tool('portal_setup')
setup.runImportStepFromProfile(
    'profile-collective.contentalerts:default',
    'plone.app.registry'
)

# set the stop words on the new field
api.portal.set_registry_record(
    name='collective.contentalerts.interfaces.IStopWords.forbidden_words',
    value=current_forbidden_words
)

# remove the old setting
registry = getUtility(IRegistry)
del registry.records[old_setting]

贡献

  • 问题跟踪器:https://github.com/collective/collective.contentalerts/issues rel="nofollow">https://github.com/collective/collective.contentalerts/issues
  • 源代码:https://github.com/collective/collective.contentalerts" rel="nofollow">https://github.com/collective/collective.contentalerts

许可证

该项目是根据GPLV2授权的。

学分

der freitag 赞助创建此附加组件。

贡献者

  • gil forcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada,gilforcada

更改日志

2.0.0(2019-02-11)

  • 对plone 4.3、5.0、5.1和(实验)5.2进行测试。

2.0a1(2016-07-28)

  • 使collective.contentalerts与plone 5一起工作 需要进行以下调整:删除会话数据管理器,使用z3c.form而不是 formlib,通过irichtext对象访问文本,测试中的一些更改。 [斯塔夫]

1.1(2016-03-29)

  • 请确保仅在需要时删除标记接口。 [gforcada]

1.0.post0(2016-03-12)

  • 更新德语翻译。 [斯塔夫]

1.0(2016-03-11)

  • 重命名注册表设置 , 现在使用两个列表: 禁止的单词 不充分的单词 。 有关如何创建升级步骤来迁移它们的说明,请参见 readme.rst 。 [gforcada]
  • 更新了 ialert 实用程序,以使用两个停止词列表中的一个, 或者只有一个(作为参数传递)。 [gforcada]
  • 添加一个 has\u forbidden\u words 方法到 IAlert 实用程序。 它只允许检查禁止的停止字。 [gforcada]
  • 通过允许传递标记接口和审阅状态,使"审阅对象"视图更通用。 这允许过滤哪些元素将被检查为停止字。 [gforcada]
  • 将内容规则增加三倍,这样就可以决定监视任何类型的单词, 只说禁止的话或不恰当的话。 [gforcada]

0.7(2016-01-22)

  • 监视注册表设置(停止字)的更改。 如果发现更改,请验证被审阅的对象是否有这些新的停止字。 [gforcada]
  • 一轮的清理、重构和覆盖修复。 [gforcada]
  • 有条件地依赖collective.taskqueue以异步方式执行批量处理。 [gforcada]

0.6(2016-01-20)

  • 丢弃警报时应用IStopWordsVerified。 [gforcada][staeff]
  • 排序IMPorts,使用plone.api和一些构建清理。 [gforcada]

0.5(2016-01-19)

  • 支持plone 4.3.7 [gforcada]
  • 使规范化为全局函数 [gforcada][staeff]

0.4.post1(2015-08-31)

  • 添加德语翻译。 [斯塔夫]

0.4.post0(2015-08-19)

  • 也可以创建轮子。

0.4(2015-08-19)

  • 添加浏览器视图以按对象移除iHassTopWords标记界面。 [gforcada]

0.3.1(2015-08-17)

  • 确保 iHassTopWords 标记接口已在目录上编制索引。 [gforcada]

0.3.post0(2015-08-15)

  • 修复包URL。 [gforcada]

0.3(2015-08-14)

  • 正确分割停止字文本,以便它考虑到不同的行尾。 [gforcada]
  • 忽略停止字上的空行以避免产生意外结果。 [gforcada]

0.2(2015-08-14)

  • 将字符串分为两部分: 文本警报 注释警报 。 [gforcada]

0.1(2015-08-14)

  • 初次发布。 [gforcada]

  • 修复包结构:

    • 拆下不需要的零件
    • 添加Travis和工作服徽章

    [gforcada]

  • 添加一个 plone.registry 以保留常规停止词列表。 [gforcada]

  • 添加控制面板configlet以编辑停止字列表。 [gforcada]

  • 添加更多的代码分析检查、依赖跟踪程序和清单检查 [gforcada]

  • 添加实用程序以搜索给定文本上的停止字 [gforcada]

  • 添加plone.app.contentrules条件: collective.contentalerts.textalert [gforcada]

  • 添加字符串替换: 文本警告 。用于按内容规则撰写电子邮件 [gforcada]

  • 将标记接口应用于发现有停止字的对象。 [gforcada]

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

推荐PyPI第三方库


热门话题
java中STDIN的不同方式是什么   java有没有办法让程序将文本文件中的“\n”识别为换行代码?   java JList不显示项目   java试图反转句子中的字符   infinte列表中的java搜索策略   java使用motionevents模拟鼠标单击   java使用Spring@Cacheable和@PostFilter   java如何使用枚举名获取枚举id   Java无法找到并加载CSV文件   CyclicBarrier上的java可见性同步?   如何将java与javascript调用解耦?小程序正在等待自己!   java如何向被请求方发送客户端的SOAP响应   java安卓:固定位置工具栏