scms bot framework

chaos

is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Smogon Discord Contributoris a Contributor to Smogonis an Administratoris a Tournament Director Alumnusis a Researcher Alumnus
Owner
I made this thread for two reasons.

A) to warn people to not make frivolous edits that can be made with a machine

and more importantly

B) to show off

so. First order of business. Don't waste time making edits like e -> é; we can do that automatically.

Second order of business. I just made a bot that shows you the differences on the command prompt of mass edits and asks you if you want to make the changes.

Code:
[/home/betawww/smogon] python
Python 2.5.1 (r251:54863, Oct 11 2007, 15:31:19)
[GCC 3.4.4 [FreeBSD] 20050518] on freebsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> from smogon.tools import *
>>> bot = botfn.askbot(lambda t: (t.replace("cool", "gay"), "shit"))
>>> bots.revision_editor(bot)
- <p>Though Aipom is certainly very cool, it's not very useful. That's a shame, but it's fun to use on favorites teams and the like.</p>
?                                   ^^^^

+ <p>Though Aipom is certainly very gay, it's not very useful. That's a shame, but it's fun to use on favorites teams and the like.</p>
?                                   ^^^

Apply edit (y/n)?
for those who arent coding literate, i made a bot that replaces every instance of "cool" with "gay" with the edit reason "shit". the revision editor bot goes through every current revision and shows me all the changes it would make and then asks me if i want to do them.

thats fucking cool. im awesome.
 

Jackal

I'm not retarded I'm Canadian it's different
is a Tournament Director Alumnusis a Site Content Manager Alumnusis a Senior Staff Member Alumnusis a Contributor Alumnusis a Dedicated Tournament Host Alumnusis a Battle Simulator Moderator Alumnus
Sweet, i just started my computer programming course this year and I kind of understand whats going on there. Python looks neat.

That will obviously be very useful.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top