手册:Pywikibot/总览

From mediawiki.org
This page is a translated version of the page Manual:Pywikibot/Overview and the translation is 85% complete.

Pywikibot是一个在MediaWiki网站中,自动化工作的Python库以及工具集合。早期被设计用于维基百科,现在它可用于整个维基媒体基金会的项目网站,以及大多数其他MediaWiki网站。

本项目开始于2003年,当前为核心版本9.0.0。 本项目的特点为完全的 API 使用、与时俱进的MediaWiki特性以及一个Python式的包布局。 但它也支持更老的版本(如 MediaWiki 1.23 )和更新的版本。

Pywikibot在适配的Python版本下支持微软Windows、OS X和Linux系统。 Pywikibot在适配的Python版本下也应该支持其他任何操作系统。 在命令提示符中输入“python”来检查你是否已经安装Python或查看已安装的版本号。

Python 3.7 or higher is currently required to run the bot.

Python can be downloaded here.

Download

$ python -m pip install pywikibot

For more information, see here.

组件

库文档中有两个主文件夹:

  • pywikibot包含所有的主文件,这些文件将与MediaWiki网站进行交互。 It's the master part of the library: they're used when you load PWB in your own Python scripts and when you launch plug-and-play tools.
  • scripts包含一些完成的、已知的且经过验证的脚本。 它们随时可以使用。每个脚本的用法参见Manual:Pywikibot/脚本 中的列表和文档。

See also

许可协议

您可以在此处查看Pywikibot的许可协议文件。

其他许可