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:
http://emacswiki.org/test?search=search%20(and%7cor)%20replaceIf 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.
http://www.emacswiki.org/cgi-bin/test?search=search+%28and|or%29+replace&replace=foo+%241+bar&pwd=testYou 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: