Manual:edit.php
Appearance
MediaWiki ファイル: edit.php | |
---|---|
場所: | maintenance/ |
ソース コード: | master • 1.44.0 • 1.43.3 • 1.39.13 |
クラス: | EditCLI |
詳細
edit.php ファイルは、コマンドラインから記事を編集するメンテナンス スクリプトです。
使用法
php edit.php [options...] <title>
オプション
オプション/パラメーター | 説明 |
---|---|
-u <user> |
利用者名 |
-s <summary> |
編集の要約 |
-m | 細部の編集 |
-b | Bot (hidden) edit |
-a | 自動要約の有効化 |
--no-rc | 最近の更新に更新を表示しない |
指定した利用者が存在しない場合は、作成されます。 If no username has been provided, the edit will be attributed to user "Maintenance script", created if needed. The text for the edit will be read from stdin.
例
php edit.php -s "Quick edit" -m Page_I_want_to_edit < file_containing_wikitext
The above will edit the page Page_I_want_to_edit
(marking the edit minor) so it contains the contents of the file file_containing_wikitext using the edit summary Quick edit.
php getText.php "page_title" | sed -e 's/\bfoo\b/bar/g' | php edit.php "page_title"
The above will take the text of the page page_title
from your wiki, replace every occurrence of the word foo with the word bar, and save the result back to the page page_title
.
You can do many complex text transformations of page text this way; see your unix manual's entry for sed.