MediaWiki 机器人自动从外部网站复制内容
我试图找到一个 MediaWiki 机器人或扩展程序来执行以下操作:
我有时将外部内容复制到 MediaWiki 以在适当的上下文中显示它并使其可搜索。那不是很干。
我想使用特殊标签保留原始内容的实时链接,并在原始内容发生更改时让机器人更新 MediaWiki 页面。
例如,该代码片段可能是 Subversion 中的一个配置文件,我想在文档中引用它。我想做类似的事情:
<external-content
url="http://svn/config.txt"
start="#begin snippet"
end="#end snippet">
</external-content>
MediaWiki 机器人会下载 http://svn/config.txt
,保留 #begin snippet
和 #end 之间的所有内容snippet
注释,并将结果粘贴到外部内容标记之间。
这样我就可以确保当我更改 config.txt
时,我的 MediaWiki 文档保持同步。
还有许多其他用途。我不仅仅考虑引用 Subversion 内容,还有许多其他基于 Web 的系统包含我想以这种方式集成的数据。
有谁知道有一个机器人可以做到这一点?
I am trying to find a MediaWiki bot or extension that would do the following:
I sometimes copy external content to MediaWiki to display it in proper context and to make it searchable. That is not very DRY.
I would like to keep a live link to the original content using a special tag and have a bot update the MediaWiki page if the original content changes.
For instance, the snippet could be a configuration file in Subversion that I want to reference in documentation. I would like to do something like:
<external-content
url="http://svn/config.txt"
start="#begin snippet"
end="#end snippet">
</external-content>
The MediaWiki bot would download http://svn/config.txt
, retain everything between the #begin snippet
and #end snippet
comments, and paste the result right between the external-content tags.
This way I can be sure that as I change the config.txt
, my MediaWiki documentation stays in sync.
There are numerous other uses. I am not looking only into referencing Subversion content, there are many other web-based systems with data I would like to integrate in this manner.
Does anyone know of a bot that would do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 MediaWiki 解析器标记扩展 来完成此操作。事实上, "Include" 扩展 似乎所做的事情与您的操作非常相似要求。
You could probably do this with a MediaWiki parser tag extension. In fact, the "Include" extension seems to do something very much like what you're asking for.