(Redirected from B:TIAC)
|Note:||Future operations will be written in Python, most likely.|
|This user is a bot controlled by Mathfreak231 (talk | contribs). It is a legitimate alternate account used for speedily making large amounts of edits in place of a human. If it has been malfunctioning, please comment on the developer's talk page.|
Remove Category:Redirects and other categories from redirect pages. Done
Replace links to the 1.4 forum archive with Template:Forum Archive. Done
Check the move log to see recently moved items; if there are new ones since it last checked, it changes all links to the old page to the new page (given the page is non-talk). Not running
- Search for pages on the English Scratch Wiki that have an interwiki link to a page on the DACH Scratch Wiki where the DACH page doesn't link back.
When is it running?
This bot runs on Google's servers, as far as I know. If Google is having problems and can't send HTTP requests from Google Apps scripts, ThisIsAnAccount is doomed.
If there is an error in the code, I get notified by email.
This bot uses a top-down approach. Once a minute it looks up the first page in Category:Redirects and uses a regex to find where the redirect leads. It then replaces the page's contents with
#REDIRECT [[<redirect destination>]], thereby removing the category and making redirect pages on the wiki consistent as a side effect.
The bot looks up links to http://scratch.mit.edu/forums/viewpost.php. If the resulting URL is of the redirect type, the bot sends an HTTP GET to that URL without following the redirect, and replaces the link with Forum Archive as corresponds to the URL in the Location header. Otherwise, the bot replaces the link with Forum Archive normally.
Every 5 minutes, the bot looks at the move log starting at the time it last checked it (User:ThisIsAnAccount/LastUpdated). For every entry in the move log, it gets all links to the old page. It uses a regex to replace the links from the old page to the new page.
Other general info
This bot sends POST requests for all queries/changes, because Google isn't cool like Python Requests and won't convert a dict to URL parameters.
Contact the owner
There are multiple ways to get to me about faulty edits. They are listed here, in order of the chance I will see it:
Replace the contents of this page with anything besides "true" (preferably "false"). It should take effect in at most 6 minutes. Alternatively, you can ask for the bot to be blocked as a last resort.
The bot's core request scripts, as well as some of the generic functions such as
edit were all based on blob8108's bot engine. Many thanks to him.
I, having no creativity whatsoever, couldn't decide what I wanted this bot to do. My first idea was automatically categorizing redirects. I submitted this idea to scmb1, and she was a bit skeptical. So I started a pretty big discussion about whether the category was necessary. It ended that the category would be removed, and I got dibs on programming what is now Task 1.
I cheered when I finally got the program to log in correctly and again when I got it to edit a page.