Manual:cleanupCaps.php
Appearance
| MediaWiki バージョン: | ≧ 1.5 |
| MediaWiki ファイル: cleanupCaps.php | |
|---|---|
| 場所: | maintenance/ |
| ソース コード: | master • 1.45.1 • 1.44.3 • 1.43.6 |
| クラス: | CapsCleanup |
詳細
cleanupCaps.php file is a maintenance script that is used to clean up broken page links when somebody turns off $wgCapitalLinks. The conversions will be attributed to the user called Conversion script.
This script transforms ALL the pages from your Wiki from uppercases to lowercases and creates redirects from the uppercases to lowercases (example: If you have a page called "Bear", it will move it to page "bear" and the page "Bear" will be a redirect to "bear") - do not use this script, unless you are prepared to manually fix a lot of redirects!
オプション/引数
| オプション | 説明 | 必須かどうか |
|---|---|---|
| --dry-run | Don't actually try moving them. | 省略可能 |
| --namespace | Namespace to run the script for. Default is 0 (main namespace). | 省略可能 |
使用法
php maintenance/run.php cleanupCaps [ --dry-run| --namespace ]
MediaWiki バージョン MediaWiki 1.39 以前では、メンテナンス スクリプトを
php maintenance/run.php スクリプト名 ではなく php maintenance/スクリプト名.php を使用して実行する必要があります。Checking with dry-run
Terminal
$ php maintenance/run.php cleanupCaps --dry-run Will be moving pages to first letter lowercase titles Processing page... "Main Page" -> "main Page": DRY RUN, NOT MOVED "Saraswati Maa" -> "saraswati Maa": DRY RUN, NOT MOVED "abc" already lowercase. Finished page... 2 of 5 rows updated
Actually moving pages
Terminal
$ php maintenance/run.php cleanupCaps Will be moving pages to first letter lowercase titles Processing page... "Main Page" -> "main Page": OK "Saraswati Maa" -> "saraswati Maa": OK "abc" already lowercase. Finished page... 2 of 5 rows updated