Anonymous user
Other parameters: Difference between revisions
Fixed and aligned some <pre> and <code>
(repaired cross-reference links) |
(Fixed and aligned some <pre> and <code>) |
||
Line 9:
Syntax:
<i>rule</i>;
...
<i>rule</i>;
Where rule is one of the following:
* rules for batch update of articles
replace
before
after
* rules for interactive update of articles
template ''template name'';
legend ''legend article name'';
table ''table format'';
editform ''form parameters'';
action ''form action'';
hidden ''value'';
submit ''submit button'';
commit ''commit button'';
parameter ''parameter name'';
* common rules
summary
exec
The first group of rules is intended for batch updates of articles. A DPL query can select a group of articles and perform updates like inserting a piece of text at a certain position or changing text portions based on regular expressions.
Line 74 ⟶ 73:
A DPL statement may contain replacement, insertion before and after at the same time.
replace /([a-z]+])-cat/;
by \1-dog;
before foo;
insert bar;
after foo;
insert bar2;
Only one 'replace'-'by' sequence, one insertion 'before' and one insertion 'after' can be specified. 'replace' is always executed first, followed by 'insert before' and 'insert after', regardless of the sequence in which the rules appear in the DPL source ´text.
Line 92 ⟶ 91:
a regular expression
after
insert
replace
by
For safety reasons the update statements will only be performed if "exec yes" is specified. So, leaving this away, you can check what would happen if the update were to be executed.
Line 114 ⟶ 113:
}}
reason <i>text</i>;
exec true;
This command is experimental at the moment.
Line 192 ⟶ 190:
Example:
<pre><nowiki>
</nowiki></pre>
Line 291 ⟶ 289:
<pre><nowiki>
{{#dpl:
| namespace = Media
| debug = 0
| namespace = Special
}}
</nowiki></pre>
|