Help:Bots/zh

机器人是一个计算机程序，它可以在执行时自动获取或更新 wiki 页面. 通常情况下，机器人都被用于执行繁复的维护任务，这些任务的工作量和特征对于用户手动执行来说过于繁重.

开发和运行机器人程序通常都不属于普通用户的角色范畴，这需要编程经验，并且必须在 wiki 管理员的协助下才能完成.

默认情况下，机器人的编辑在 Special:最近更改 中是被隐藏的.

机器人开发框架和接口
机器人不使用通常的图形用户界面（GUI）来访问 wiki. MediaWiki 有用于此目的的 API（Application Programming Interface，应用程序编程接口 -- 译者 Finalvictory (talk) 注）. API 是两个计算机程序之间标准化通信的协议. 详情可参考 API:Client code.

To access a wiki through the API a bot must have a user account, which has been granted 'bot' permissions.

pywikibot
Pywikibot provides a framework for the development of bots, which are commonly used to perform maintenance tasks such as adding a footer to some categorized pages (add_text.py), adding some wikilinks, moving old contents of talk pages to subpages , editing categories , or managing templates.

wiki-java
wiki-java is a lightweight Java framework for bot/application development and can be used to perform various tasks, such as uploading files, adding text to articles, parsing templates, basic I/O, etc. The library also comes with simple, but powerful standalone bot methods that can be readily utilized by a programmer.

可选扩展

 * Extension:MassEditRegex provides an alternative way to perform mass edits using regular expressions, through a special page in the wiki. Only admins can normally use this extension.
 * Extension:ReplaceText is another option.