Talk:Yi-bot.pl

From Organic Design
(Redirected from Talk:Yi-bot)
Note.svg Note: this article needs to be in multiple workflows. A category for a technical writer, workflow todo, and automation


This script uses the Simple Forms extension to allow creating or updating articles without needing to sign in and pattern match the human forms. To do it the normal bot way see wiki.pl, but this way is much more efficient.

Global replacement

Hi Nad, the Malay language is still undergoing great changes. As such, many terminologies are replaced from time to time. What I need is a word-to-word replacement. Sometimes these words may be a compound word comprising up to three words. Also I would like to remove some template references, eg many a time, I decided that I don't need the template anymore and I want to remove all reference to it. If a global replace like in Microsoft word where I can replace a word with a blank, that would solve my problem. Thanking you in advance. — PM Poon 13:48, 10 December 2007 (NZDT)

  • First save the script on the machine running the wiki (if windows, you'll need to install perl - I recommend ActivePerl), and make sure it has executable permissions.
  • Edit the script and set $wiki to the URL of your wiki including the index.php
  • Set @articles to comma separated list of article titles you want to apply the replacement rule to
  • Set the replacement rule where it says s/old/new/g; just change old and new to the words you want or to blank - whenever you try a new rule, test it on a sandbox article before doing a whole list of articles.
  • To learn about how to do more complex pattern matching and replacement rules, see this tutorial
--Nad 22:23, 10 December 2007 (NZDT)