(Redirected from B:TIAC)

DEACTIVATED
This bot is no longer active on the Scratch Wiki.
Note Note: Future operations will be written in Python, most likely.


Robot TestTemplate CP.jpeg 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.


ThisIsAnAccount
Name ThisIsAnAccount
Task(s) Carry out general repetitive tasks
Status Off
Programming language Google App (JavaScript)
Introduced in June 3, 2014

Tasks

Task 1

Remove Category:Redirects and other categories from redirect pages. Yes Done

Task 2

Replace links to the 1.4 forum archive with Template:Forum Archive.Yes Done

Task 3

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). No Not running

Reference-Only Tasks

  • 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.

Documentation

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.

Edit process

Task 1

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.

Task 2

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.

Task 3

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:

Emergency shutoff

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.

Known bugs

Description:
(Task 1) If there is not a newline between the redirect and the category, the regex sees "<TARGET>]][[Category:Redirects" as the target of the redirect (with <TARGET> being the actual target) and therefore makes no changes to the page.

Status: Resolved

Solution:
Replaced the "+" quantifier with the non-greedy "+?" quantifier.


Creation

The bot's core request scripts, as well as some of the generic functions such as read and 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.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.