Difference between revisions of "Talk:Yi-bot.pl"

From Organic Design wiki
m (Talk:Yi-bot moved to Talk:Yi-bot.pl: Associate as a perl script)
(no cat)
 
Line 1: Line 1:
{{Todo|Expand on the exact usage of this script. For example
 
*It is run server side
 
*How to roll back a series of robot edits
 
*Scheduler interfacing
 
* New task: Move All categories within articles to the bottom of articles by convention.
 
}}
 
 
 
{{Note|this article needs to be in multiple workflows. A category for a technical writer, workflow todo, and automation}}
 
{{Note|this article needs to be in multiple workflows. A category for a technical writer, workflow todo, and automation}}
  
Line 11: Line 4:
  
 
== Global replacement ==
 
== 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. — [[User:PM Poon|PM Poon]] 13:48, 10 December 2007 (NZDT)
 
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. — [[User:PM Poon|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 [http://www.activestate.com/store/download_file.aspx?binGUID=e5c71329-b7a6-4563-8199-e1483f751c4f ActivePerl]), and make sure it has executable permissions.
 
:*First save the script on the machine running the wiki (if windows, you'll need to install perl - I recommend [http://www.activestate.com/store/download_file.aspx?binGUID=e5c71329-b7a6-4563-8199-e1483f751c4f ActivePerl]), and make sure it has executable permissions.

Latest revision as of 06:20, 18 July 2011

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)