Extension:MassEditRegex

This page is a translated version of the page Extension:MassEditRegex and the translation is 22% complete.
Other languages:
English • ‎Türkçe • ‎polski • ‎日本語
MediaWiki 拡張機能マニュアル
OOjs UI icon advanced.svg
MassEditRegex
リリースの状態: 安定
MassEditRegex.png
実装 ページの操作 , 特別ページ
説明 Allows for using regular expressions to edit multiple pages at once
作者 Adam Nielsen (Malvineousトーク)
最新バージョン 8.4.0 (2019-12-28)
MediaWiki 1.29+
データベースの変更 いいえ
ライセンス GNU 一般公衆利用許諾書 2.0 以降
ダウンロード
  • $wgAjaxExportList
  • masseditregex
translatewiki.net で翻訳を利用できる場合は、MassEditRegex 拡張機能の翻訳にご協力ください

使用状況とバージョン マトリクスを確認してください。

問題点 未解決のタスク · バグを報告

The MassEditRegex extension allows administrators perform a single edit across multiple pages in one step, by running a regular expression over the content of each page. This is well suited to performing simple edits such as renaming a template, adding pages to a category, or correcting typos (all of which can be done in the same edit operation by supplying multiple regular expressions.)

使用法

Once the extension has been installed and permission masseditregex to use MassEditRegex has been given, go to "Special:MassEditRegex" and fill out the edit form. Familiarity with regular expressions is required to use this extension.

特徴

  • Page iteration can be done on the client side, so PHP maximum execution time is no longer an issue when editing large numbers of pages.
  • Transform each page using one or more regular expressions in a single step.
  • Edits appear as "bot" so they don't show up in the normal edit list (unless the user chooses to show bot edits).
  • Only users with the masseditregex permission can perform changes.
  • A new "edit all" tab appears on category pages and on Special:WhatLinksHere, for editing all listed pages at once.
  • Pages to edit can be specified as:
    • A list of page names
    • A list of page name prefixes (e.g. "Test" will match pages called "Testing" and "Tested")
    • A list of categories (all pages within the categories will be edited)
    • A list of backlinks (pages edited are those linking to the ones in the list)

インストール

MediaWiki 1.34 以前を稼働させている利用者へ:

上記の手順では、wfLoadExtension() を使用してこの拡張機能をインストールする新しい方法を記載しています。 この拡張機能をこれらの過去のバージョン (MediaWiki 1.34 以前) にインストールする必要がある場合は、wfLoadExtension( 'MassEditRegex' ); の代わりに以下を使用する必要があります:

require_once "$IP/extensions/MassEditRegex/MassEditRegex.php";

設定

This extension comes with an extra user right called "masseditregex" to allow fine grained control of which user groups may use this extension. By default it is assigned to no user group. In case you would like to assign it to a user group e.g. "masseditregexeditor", add the following code to you "LocalSettings.php" file right after the lines added in step (3) of the installation process:

$wgGroupPermissions['masseditregexeditor']['masseditregex'] = true;

Alternatively you may grant the permission to an existing user group, e.g. "sysop" by adding the following line:

$wgGroupPermissions['sysop']['masseditregex'] = true;

既知の問題点

Server-side execution is the default as it (should) be faster. However editing large numbers of pages will cause server timeouts due to PHP limits on script execution time. To work around this (and perhaps to get better feedback on progress) you can tick "execute in browser" to have the job tracking done on the client-side. This should mean timeouts are no longer a problem.

関連項目