This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
zref:wiki:pluginsyntax:batchedit [2025/04/22 13:44] – removed - external edit (Unknown date) 127.0.0.1 | zref:wiki:pluginsyntax:batchedit [2025/04/22 13:44] (current) – ↷ Page moved from wiki:pluginsyntax:batchedit to zref:wiki:pluginsyntax:batchedit Alan Shea | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== BatchEdit Plugin ====== | ||
+ | < | ||
+ | ---- plugin ---- | ||
+ | description: | ||
+ | author | ||
+ | email : dwpforge@gmail.com | ||
+ | type : admin | ||
+ | lastupdate : 2023-06-16 | ||
+ | compatible : Hrun, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum | ||
+ | depends | ||
+ | conflicts | ||
+ | similar | ||
+ | tags : search, replace, regexp, editing | ||
+ | |||
+ | downloadurl: | ||
+ | bugtracker : https:// | ||
+ | sourcerepo : https:// | ||
+ | </ | ||
+ | ---- | ||
+ | {{ https:// | ||
+ | |||
+ | |||
+ | BatchEdit is an admin plugin that allows you to use regular expressions to search and replace text on DokuWiki pages. As it works with raw DokuWiki text, the plugin can be also used to modify markup of the pages. This can be very helpful when there are multiple pages with similar markup. For example, you can update pages created from a [[doku>: | ||
+ | |||
+ | |||
+ | ===== Download and Installation ===== | ||
+ | |||
+ | Search and install the plugin using the [[doku> | ||
+ | |||
+ | * [[https:// | ||
+ | |||
+ | |||
+ | ===== User Interface ===== | ||
+ | |||
+ | After installation BatchEdit shows up on the // | ||
+ | |||
+ | {{ https:// | ||
+ | |||
+ | * // | ||
+ | * //Search for// -- depending on selected options this can be plain text string, regular expression, or fully qualified regular expression including delimiters and modifiers. BatchEdit uses Perl-compatible syntax of regular expression as defined by [[http:// | ||
+ | * //Replace with// -- the replacement text or pattern. For the syntax see [[http:// | ||
+ | * //Edit summary// -- summary of the replacement. This field has the same purpose as the //Edit summary// field of the DokuWiki text editor. | ||
+ | |||
+ | Below the edit fields there are two buttons: | ||
+ | |||
+ | * //Preview// -- shows the search results with corresponding replacements but does not do the replacement itself. | ||
+ | * //Apply// -- replaces selected (see below) matches. If there are no selected matches it acts identical to the //Preview// button. | ||
+ | |||
+ | {{ https:// | ||
+ | |||
+ | BatchEdit displays search matches in separate boxes, which are grouped per page. Next to the page identifier and on every match box there is a check box, which is used to mark matches for replacement. In order to prevent unexpected results the check box is unchecked by default requiring the user to confirm every replacement. The match box is split in two parts: matched text with some context on the left side; and the same fragment with applied replacement on the right. Both the matched text and the replacement are highlighted. | ||
+ | |||
+ | After the replacement, | ||
+ | |||
+ | |||
+ | ==== Configuration ==== | ||
+ | |||
+ | BatchEdit uses two types of configuration options: | ||
+ | * User-specific options -- all options available on BatchEdit page are individual for each user. These options are stored in a browser cookie, so strictly speaking they are browser-specific. | ||
+ | * Global options -- can be modified on DokuWiki configuration page. They control aspects of BatchEdit operation, which are rarely (if ever) to be changed. | ||
+ | |||
+ | |||
+ | ===== Technical details ===== | ||
+ | |||
+ | ==== Performance ==== | ||
+ | |||
+ | BatchEdit performs caching of the search results to avoid repeating the search when replacement is applied. Yet on every preview attempt the DokuWiki server reads all the pages from a hard drive. To reduce the server load and search time use // | ||
+ | |||
+ | |||
+ | ==== Concurrent page edits ==== | ||
+ | |||
+ | Because of two-staged approach of Preview& | ||
+ | |||
+ | This verification still leaves a possibility that replacement will be applied to a different instance of the original text that happened to be at the exactly right offset after the edit, but likelihood of that is rather small. Anyway, it's recommended that administrators take care to minimize DokuWiki activity when BatchEdit is used. | ||
+ | |||
+ | |||
+ | ==== Page lookup ==== | ||
+ | |||
+ | BatchEdit uses DokuWiki page index to get the list of existing pages instead of going through the data directories. Because of the missing or incomplete index BatchEdit may show less search results than expected. This is often the case for a freshly migrated wiki. You can use [[doku> | ||
+ | |||
+ | This limitation also applies to the " | ||
+ | |||
+ | |||
+ | ===== Version History ===== | ||
+ | |||
+ | ==== 2023-06-16 ==== | ||
+ | |||
+ | * Added support for replacement in multiple namespaces | ||
+ | * Fixed compatibility with DokuWiki Jack Jackrum | ||
+ | |||
+ | ==== 2022-02-20 ==== | ||
+ | |||
+ | * Added option to replace [[https:// | ||
+ | * Added Portuguese localization | ||
+ | * Added Dutch localization | ||
+ | * Fixed Bootstrap conflict with jQuery tooltip | ||
+ | * Minor localization updates | ||
+ | |||
+ | ... | ||
+ | |||
+ | ===== Bugs and Feature Requests ===== | ||
+ | |||
+ | Please report bugs or feature requests at the [[https:// | ||