手册:PopulateInterwiki.php
Appearance
| MediaWiki文件: populateInterwiki.php | |
|---|---|
| 位置: | maintenance/ |
| 源代码: | master • 1.46.0 • 1.45.4 • 1.43.9 |
| 类: | PopulateInterwiki |
详情
populateInterwiki.php是一个给interwiki表增加数据的维护脚本,用于提取在Wikipedia或其他MediaWiki维基上使用的跨维基链接。
选项
| 选项 | 说明 | 是否必须 | 默认值 |
|---|---|---|---|
| --source | Source wiki for interwiki table, such as https://wiki.org/w/api.php | Optional | https://en.wikipedia.org/w/api.php |
| --force | Run regardless of whether the database says it has been run already. | Optional |
用法
php maintenance/run.php populateInterwiki [ --source| --force ]
在MediaWiki MediaWiki 1.39及更早版本中,您必须通过
php maintenance/脚本名称.php调用维护脚本,而不是php maintenance/run.php 脚本名称。
使用默认英语维基百科填充
Terminal
$ php maintenance/run.php populateInterwiki Interwiki links are populated.
使用用户API地址填充
Terminal
$ php maintenance/run.php populateInterwiki --source "https://www.mediawiki.org/w/api.php" Interwiki links are populated.
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.