MassChanges

Last edit

Summary: Rückgängig gemacht auf den Stand vom 2013-08-24 11:21 UTC

Changed:

< == WikiModes & Replace ==
< If you're one of the EmacsWikiAdministrators, you can do WikiModes and replace operations on the entire wiki.

to

> == Search & Replace ==
> If you're one of the EmacsWikiAdministrators, you can do search and replace operations on the entire wiki.

Changed:

< * ##http://emacswiki.org/test?WikiModes=WikiModes%20(and%7cor)%20replace##

to

> * ##http://emacswiki.org/test?search=search%20(and%7cor)%20replace##

Changed:

< * ##http://www.emacswiki.org/cgi-bin/test?WikiModes=WikiModes+%28and|or%29+replace&replace=foo+%241+bar&pwd=test##

to

> * ##http://www.emacswiki.org/cgi-bin/test?search=search+%28and|or%29+replace&replace=foo+%241+bar&pwd=test##


 Search & Replace

If you’re one of the EmacsWikiAdministrators, you can do search and replace operations on the entire wiki. Unfortunately it’s not that easy.

First, you need to “hack the URL” using Perl regular expressions and URL-encoding the query string:

If you’re happy with the result, provide a replacement as well. Again, this uses Perl syntax and requires URL-encoding. Remember, you need to be logged in as an administrator.

 Downloading and Uploading

You can also communicate with the wiki using simple HTTP GET and POST requests. This makes the use of command-line tools like curl feasible.

In this example we’ll add a horizontal line and a category tag to all the pages listed in the loop:

for f in AdamSpiers Adrian_Aichner AhmetUsal ...; do
    echo $f
    curl http://emacswiki.org/cgi-bin/wiki/raw/$f > $f;
    echo "----" >> $f;
    echo "CategoryHomepage" >> $f;
    curl -F recent_edit=on -F summary=CategoryHomepage -F title=$f \
         -F "text=<$f" -F uihnscuskc=1 -F username=AlexSchroeder \
         http://emacswiki.org/cgi-bin/wiki
    sleep 5;
done

Explanation: