手册:cleanupEmptyCategories.php

This page is a translated version of the page Manual:CleanupEmptyCategories.php and the translation is 60% complete.
Outdated translations are marked like this.
MediaWiki版本:
1.28

细节

cleanupEmptyCategories.php是一个用于清理category数据表中的空分类的维护脚本。 此脚本会移除没有描述页面的空分类,并添加有描述页面的空分类来清理category数据表。 它将分批次打印出进度指示器。 此脚本可以非常安全地在大型的,活跃的维基上运行,并且运行多次也不会有影响。 如果运行脚本造成过高负载,您可以使用限制参数;这不会影响准确性。

如果需要中断脚本并稍后恢复,您可以使用--mode和--begin参数带上最后打印出的进度指示,以从您中断的位置开始工作。

Options/Arguments

选项/参数 描述 Required?
--mode Use "add" option to empty categories with description pages, "remove" option to empty categories without description pages or "both" to actually do both. Default: both Optional
--begin Only do categories whose names are alphabetically after the provided name Optional
--throttle Wait this many milliseconds after each batch. 默认值: 0 Optional
--force If the script was already ever used once force it to cleanup again. Default: unused Optional

用法

php maintenance/cleanupEmptyCategories.php [ --mode| --begin| --throttle| --force ]


Terminal


Whenever the script runs, it makes a note in the database and will not run again. If you want to run the script again, run the command with the --force option.

参见bug T235019

See also