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

Content deleted Content added
Updating source) (bot
m Replaced deprecated <source> tags with <syntaxhighlight>
 
(5 intermediate revisions by 5 users not shown)
Line 1:
Source as of 0309:4937, 2028 MarchDecember 2014 (UTC).
 
== Sandbot1.py ==
Line 17:
If the template is present, it does nothing.
 
<sourcesyntaxhighlight lang="python">
#!/home/sigma/.local/bin/python3
# -*- coding: utf-8 -*-
Line 27:
 
import ceterach
from ceterach import passwords
 
import mwparserfromhell as mwparser
Line 85:
main()
 
</syntaxhighlight>
</source>
 
== Sandbot2.py ==
Line 98:
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■--></pre>
 
<sourcesyntaxhighlight lang="python">
#!/home/sigma/.local/bin/python3
# -*- coding: utf-8 -*-
Line 112:
 
import ceterach
from ceterach import passwords
 
reset_text = "{{subst:Sandbox reset}}"
Line 167:
# will clear the box regardless.
print("Done with sleeping, clearing {!r}".format(box.title))
self.api.login("Lowercase sigmabot II", ceterach.passwords.lcsb2)
self.api.set_token("edit")
text = tpl_reset_text if box.namespace == 10 else reset_text
Line 210:
 
</syntaxhighlight>
</source>