User:Lowercase sigmabot II/Source.py: Difference between revisions

Content deleted Content added
Updating source) (bot
Updating source) (bot
Line 1:
Source as of 00:3550, 29 September 2013 (UTC).
 
== Sandbot1.py ==
Line 39:
class SandBot1:
REINSERT = "{{Please leave this line alone (SB)}}\n\n"
SANDBOXES = ({"Wikipedia:Sandbox",
"Wikipedia:Tutorial/Editing/sandbox",
"Wikipedia:Tutorial/Formatting/sandbox",
Line 45:
"Wikipedia:Tutorial/Citing sources/sandbox",
"Wikipedia:Tutorial/Keep in mind/sandbox"
)}
TEMPLATES = ({"Template:Please leave this line alone (Sandbox heading)",
"Template:Sandbox heading/noedit",
"Template:Sandbox header (do not remove)",
Line 52:
"Template:Please leave this line alone (sandbox heading)",
"Template:Sandbox heading"
)}
 
def __init__(self, api, shutoff="User:Lowercase sigmabot II/Shutoff"):
Line 64:
def check_if_heading_is_gone(self, box):
tl = api.iterator(500, prop="templates", tlnamespace=10, titles=box.title)
res = {x['title'] for x in next(tl).get("templates", "")}
#print(return not res) & self.TEMPLATES
return "Template:Sandbox heading" not in [x['title'] for x in res.get("templates", "")]
 
def run(self):