For things like this I simply go into the wiki.d directory and use my favourite editor for multiple file changes (WeaverSlave) and manually find and replace on the files.<div>(Course you could take a backup first).</div><div>
<br><br><div class="gmail_quote">2008/12/6 <a href="mailto:kirpi@kirpi.it">kirpi@kirpi.it</a> <span dir="ltr">&lt;<a href="mailto:kirpi@kirpi.it">kirpi@kirpi.it</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Pmwiki is so nice that we use it extensively, really.<br>
Now, one may need to make bulk changes to the content of all/many<br>
pages at a time. This is particularly true now that, thanks to PTVs,<br>
we can use pmwiki pages to record fields like &quot;Date_of_birth:<br>
2009/10/09&quot;.<br>
<br>
Imagine you have 300 pages in a Friends group, one per friend, and<br>
each page contains:<br>
<br>
 &nbsp; &nbsp;* Name: xxx<br>
 &nbsp; &nbsp;* Surname: xxx<br>
 &nbsp; &nbsp;* Date_of_birht: xxx<br>
 &nbsp; &nbsp;* Email: xxx<br>
<br>
What if I want to correct &quot;Date_of_birht&quot; to &quot;Date_of_birth&quot; to all<br>
the 300 pages?<br>
And, what if I want to add a &quot;Sex:&quot; variable just below &quot;Surname:&quot;?<br>
<br>
I&#39;ve been told that there are unix tools like awk[1] which can make<br>
the trick but, as far as my experience goes and despite nice pages<br>
like &quot;Become an expert in 60 minutes&quot;, it turns out that it may takes<br>
ages before you can use awk: you have to *first* study Regular<br>
Expressions[2] (which are a very complicated beast and may take weeks<br>
to master), and later approach awk itself.<br>
<br>
I personally found Emacs to be a friendlier choice, although not<br>
necessarily easy to use[3].<br>
I just started Cookbook/BulkReplace[4], but I&#39;m surely not able to<br>
write about technical subjects.<br>
<br>
My questions are:<br>
a) Does anybody want/is_able to contribute his/her knowledge to the<br>
Cookbook/BulkReplace page, in order to provide pmwiki users with<br>
useful/practical advices on the matter?<br>
b) Does anybody know of a way to use php for such a purpose, so that a<br>
general script could be made into a recipe?<br>
<br>
<br>
Luigi<br>
<br>
<br>
----<br>
[1] <a href="http://en.wikipedia.org/wiki/AWK" target="_blank">http://en.wikipedia.org/wiki/AWK</a><br>
[2] <a href="http://www.pmwiki.org/wiki/Cookbook/RegularExpressions" target="_blank">http://www.pmwiki.org/wiki/Cookbook/RegularExpressions</a> thanks to<br>
Joachim Durchholz<br>
[3] I do not know how to write &quot;line break&quot;<br>
[4] <a href="http://www.pmwiki.org/wiki/Cookbook/BulkReplace" target="_blank">http://www.pmwiki.org/wiki/Cookbook/BulkReplace</a><br>
<br>
_______________________________________________<br>
pmwiki-users mailing list<br>
<a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><br><a href="http://kiwiwiki.co.nz">http://kiwiwiki.co.nz</a><br>
</div>