Difference between revisions of "User:DC64/Sandbox"
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{DISPLAYTITLE: DC64's Sandbox}} | ||
+ | {{User:DC64/Header}} | ||
+ | |||
This is my Sandbox. Suggestions that are made to improve the pages are welcome. | This is my Sandbox. Suggestions that are made to improve the pages are welcome. | ||
+ | |||
+ | ==Script== | ||
+ | Learning HTML/CSS, and starting Python. Baby steps. | ||
+ | |||
+ | ====SignaBot==== | ||
+ | I have an idea for a bot, if it were accepted here. Its task would be to add signatures that users have forgotten in talk or discussion pages. Origionally from [https://fr.wiktionary.org/wiki/Utilisateur:JackBot JackBot of Wiktionary]. Read source to see code. | ||
+ | <!-- | ||
+ | <pre> | ||
+ | #!/usr/bin/env python | ||
+ | # This script signs the comments pages of discussions. | ||
+ | |||
+ | # Important modules | ||
+ | import catlib, pagegenerators, os, codecs, urllib, re | ||
+ | from wikipedia import * | ||
+ | |||
+ | # Déclaration | ||
+ | language = "en" | ||
+ | family = "wikibooks" | ||
+ | mynick = "JackBot" | ||
+ | site = getSite(language,family) | ||
+ | |||
+ | # Lecture du fichier articles_list.txt (same format as replace.py) | ||
+ | def lecture(source): | ||
+ | PagesHS = open(source, 'r') | ||
+ | while 1: | ||
+ | PageHS = PagesHS.readline() | ||
+ | fin = PageHS.find("\t") | ||
+ | PageHS = PageHS[0:fin] | ||
+ | if PageHS == '': break | ||
+ | modification(PageHS) | ||
+ | PagesHS.close() | ||
+ | |||
+ | # Changing the wiki | ||
+ | def modification(PageHS): | ||
+ | page = Page(site,PageHS) | ||
+ | if page.exists(): | ||
+ | if page.title() != u'Utilisateur:JackBot/test' and page.title()!= u'Wikibooks:Requests for permissions' and page.namespace()!= 1 and page.namespace()!= 3 and page.namespace()!= 5 and page.namespace()!= 7 and page.namespace()!= 9 and page.namespace()!= 11 and page.namespace()!= 13 and page.namespace()!= 15 and page.namespace()!= 103 and page.namespace()!= 109 and page.namespace()!= 111 and page.namespace()!= 113: | ||
+ | return | ||
+ | else: | ||
+ | url = u'http://' + language + u'.' + family + u'.org/w/api.php?action=query&prop=info|revisions&titles=%s&format=xml' % PageHS | ||
+ | PageTemp = urllib.urlopen(url) | ||
+ | try: | ||
+ | infos = PageTemp.read() | ||
+ | reviseur = re.findall(' user="(.*?)" ',infos) | ||
+ | PageTemp.close() | ||
+ | PageEnd = page.get() | ||
+ | if PageEnd.find(u'{{delete') != -1 or PageEnd.find(u'{{nobots') != -1 or PageEnd.find(u'{{bots|deny=all') != -1: return | ||
+ | except wikipedia.NoPage: | ||
+ | print "NoPage" | ||
+ | return | ||
+ | except wikipedia.IsRedirectPage: | ||
+ | print "Redirect page" | ||
+ | return | ||
+ | except wikipedia.LockedPage: | ||
+ | print "Locked/protected page" | ||
+ | return | ||
+ | if not reviseur: return | ||
+ | if PageEnd[len(PageEnd)-8:len(PageEnd)].rfind(u'(UTC)') != -1: return | ||
+ | |||
+ | #for chacun in reviseur: | ||
+ | reviseur = str(reviseur) | ||
+ | reviseur = reviseur[reviseur.find("'")+1:reviseur.rfind("'")] | ||
+ | summary = u'Autosignature for ' + u'[[User:' + reviseur + u'|' + reviseur + u']]' | ||
+ | |||
+ | date = re.findall(' timestamp="(.*?)" ',infos) | ||
+ | date = str(date) | ||
+ | date = date[date.find("'")+1:date.rfind("'")] | ||
+ | date = date[0:date.find("T")] + u' ' + date[date.find("T")+1:date.find("Z")] | ||
+ | |||
+ | PageEnd = PageEnd + u' {{unsigned|' + reviseur + u'|' + date + u'}}' | ||
+ | #print (PageEnd.encode(config.console_encoding, 'replace')) | ||
+ | #raw_input("fin") | ||
+ | page.put(PageEnd, summary) | ||
+ | |||
+ | # Classes | ||
+ | def crawlerCat(category): | ||
+ | cat = catlib.Category(site, category) | ||
+ | pages = cat.articlesList(False) | ||
+ | for Page in pagegenerators.PreloadingGenerator(pages,100): | ||
+ | if Page.namespace() == 0: modification(u'Discussion:' + Page.title()) | ||
+ | subcat = cat.subcategories(recurse = True) | ||
+ | for subcategory in subcat: | ||
+ | pages = subcategory.articlesList(False) | ||
+ | for Page in pagegenerators.PreloadingGenerator(pages,100): | ||
+ | if Page.namespace() == 0: modification(u'Discussion:' + Page.title()) | ||
+ | |||
+ | # Linked pages | ||
+ | def crawlerLink(pagename): | ||
+ | #pagename = unicode(arg[len('-links:'):], 'utf-8') | ||
+ | page = wikipedia.Page(site, pagename) | ||
+ | gen = pagegenerators.ReferringPageGenerator(page) | ||
+ | #gen = pagegenerators.NamespaceFilterPageGenerator(gen, namespaces) | ||
+ | for Page in pagegenerators.PreloadingGenerator(gen,100): | ||
+ | if Page.namespace() == 1: modification(Page.title()) | ||
+ | elif Page.namespace() == 0: modification(u'Discussion:' + Page.title()) | ||
+ | |||
+ | # Recent Changes | ||
+ | def crawlerRC(): | ||
+ | RC = pagegenerators.RecentchangesPageGenerator() | ||
+ | for Page in pagegenerators.PreloadingGenerator(RC,100): | ||
+ | if Page.namespace() == 1: modification(Page.title()) | ||
+ | |||
+ | # Launch | ||
+ | TraitementFile = lecture('articles_list.txt') | ||
+ | #TraitementLink = crawlerLink(u'') | ||
+ | #TraitementCategory = crawlerCat(u'') | ||
+ | raw_input("Signabot") | ||
+ | </pre> | ||
+ | --> | ||
==UserBoxes== | ==UserBoxes== | ||
+ | These are userboxes that I've created. | ||
+ | |||
+ | === Patches === | ||
+ | {| | ||
+ | | {{Userbox preview|UIB=User Update Gold Rush}} | ||
+ | | {{Userbox preview|UIB=User Update Pyro}} | ||
+ | | {{Userbox preview|UIB=User Update Heavy}} | ||
+ | |- | ||
+ | | {{Userbox preview|UIB=User Update Scout}} | ||
+ | | {{Userbox preview|UIB=User Update Sniper vs. Spy}} | ||
+ | | {{Userbox preview|UIB=User Update Classless}} | ||
+ | |- | ||
+ | | {{Userbox preview|UIB=User Update Haunted Hallowe'en Special}} | ||
+ | | {{Userbox preview|UIB=User Update WAR!}} | ||
+ | | {{Userbox preview|UIB=User Update 119th}} | ||
+ | |- | ||
+ | | {{Userbox preview|UIB=User Update Mac}} | ||
+ | | {{Userbox preview|UIB=User Update Engineer}} | ||
+ | | {{Userbox preview|UIB=User Update Mann-Conomy}} | ||
+ | |- | ||
+ | | {{Userbox preview|UIB=User Update Scream Fortress}} | ||
+ | | {{Userbox preview|UIB=User Update Australian Christmas 2011}} | ||
+ | | {{Userbox preview|UIB=User Update Hatless}} | ||
+ | |- | ||
+ | | {{Userbox preview|UIB=User Update Replay}} | ||
+ | | {{Userbox preview|UIB=User Update Über}} | ||
+ | | {{Userbox preview|UIB=User Update Manniversary Update & Sale}} | ||
+ | |- | ||
+ | | {{Userbox preview|UIB=User Update Very Scary Halloween Special}} | ||
+ | | {{Userbox preview|UIB=User Update Australian Christmas 2011}} | ||
+ | | {{Userbox preview|UIB=User Update Pyromania}} | ||
+ | |- | ||
+ | | {{Userbox preview|UIB=User Update Mann vs. Machine}} | ||
+ | | {{Userbox preview|UIB=User Update Spectral Halloween Special}} | ||
+ | | {{Userbox preview|UIB=User Update Mecha}} | ||
+ | |- | ||
+ | | {{Userbox preview|UIB=User Update Robotic Boogaloo}} | ||
+ | | {{Userbox preview|UIB=User Update Scream Fortress 2013}} | ||
+ | | {{Userbox preview|UIB=User Update Two Cities}} | ||
+ | |- | ||
+ | | {{Userbox preview|UIB=User Update Love & War}} | ||
+ | |} | ||
+ | |||
+ | ===Community Events=== | ||
+ | {| | ||
+ | | {{Userbox preview|UIB=User Community Update Guard Dog}} | ||
+ | | {{Userbox preview|UIB=User Community Update Fancy vs. Nasty}} | ||
+ | | {{Userbox preview|UIB=User Community Update Mechanical Engineer}} | ||
+ | |- | ||
+ | | {{Userbox preview|UIB=User Community Update Medieval}} | ||
+ | | {{Userbox preview|UIB=User Community Update Night of the Living}} | ||
+ | | {{Userbox preview|UIB=User Community Update Wiki Birthday}} | ||
+ | |} | ||
+ | |||
+ | === Personal === | ||
+ | {| | ||
+ | | {{Userbox preview|UIB=User Birthday}} | ||
+ | |} | ||
+ | |||
+ | === Achievements === | ||
+ | {| | ||
+ | | {{Userbox preview|UIB=User Showboat}} | ||
+ | | {{Userbox preview|UIB=User May I Cut In, Too?}} | ||
+ | | {{Userbox preview|UIB=User Running With Scissors}} | ||
+ | |- | ||
+ | | {{Userbox preview|UIB=User On The Rocks}} | ||
+ | | {{Userbox preview|UIB=User Emergency Brake}} | ||
+ | | {{Userbox preview|UIB=User Punching Bag}} | ||
+ | |- | ||
+ | | {{Userbox preview|UIB=User Nose Dive}} | ||
+ | | {{Userbox preview|UIB=User TF2 Bereavements achievements}} | ||
+ | |} | ||
+ | |||
+ | ==Loadout== | ||
+ | I'll decide sometime where I want to put this. | ||
+ | |||
+ | {{ClassTabs | ||
+ | | title = Loadout | ||
+ | | selected = {{Pyro}} | ||
+ | | size = 40px | ||
+ | | icononly = yes | ||
+ | |||
+ | | scout = [[Image:Fast Learner.png|left|290px|link=Scout]] | ||
+ | {{User Item|name=Force-A-Nature|quality=Strange}} | ||
+ | {{User Item|name=Pretty Boy's Pocket Pistol|quality=Strange}} | ||
+ | {{User Item|name=Candy Cane}} | ||
+ | |||
+ | {{User Item|name=That '70s Chapeau}} | ||
+ | {{User Item|name=Fast Learner}} | ||
+ | {{User Item|name=Balloonicorn}} | ||
+ | |||
+ | | soldier = [[Image:Jumper's Jeepcap.png|left|330px|link=Soldier]] | ||
+ | {{User Item|name=Rocket Launcher|quality=Strange}} | ||
+ | {{User Item|name=Buff Banner}} | ||
+ | {{User Item|name=Market Gardener|quality=Strange}} | ||
+ | |||
+ | {{User Item|name=Jumper's Jeepcap}} | ||
+ | {{User Item|name=Professor Speks|quality=Strange}} | ||
+ | {{User Item|name=Balloonicorn}} | ||
+ | |||
+ | | pyro = [[Image:Cotton Head.png|left|330px|link=Pyro]] | ||
+ | {{User Item|name=Backburner|quality=Strange}} | ||
+ | {{User Item|name=Scorch Shot|quality=Strange}} | ||
+ | {{User Item|name=Neon Annihilator|quality=Strange}} | ||
+ | |||
+ | {{User Item|name=Cotton Head}} | ||
+ | {{User Item|name=Soot Suit}} | ||
+ | {{User Item|name=Balloonicorn}} | ||
+ | |||
+ | | demoman = [[Image:Hurt Locher.png|left|335px|link=Demoman]] | ||
+ | {{User Item|name=Grenade Launcher}} | ||
+ | {{User Item|name=Scottish Resistance}} | ||
+ | {{User Item|name=Eyelander}} | ||
+ | |||
+ | {{User Item|name=That '70s Chapeau}} | ||
+ | {{User Item|name=Hurt Locher}} | ||
+ | {{User Item|name=Balloonicorn}} | ||
+ | |||
+ | | heavy = [[Image:Big Chief.png|left|300px|link=Heavy]] | ||
+ | {{User Item|name=Brass Beast|quality=Strange}} | ||
+ | {{User Item|name=Buffalo Steak Sandvich}} | ||
+ | {{User Item|name=Fists of Steel|quality=Strange}} | ||
+ | |||
+ | {{User Item|name=Big Chief|quality=Strange}} | ||
+ | {{User Item|name=Apparatchik's Apparel}} | ||
+ | {{User Item|name=Balloonicorn}} | ||
+ | |||
+ | | engineer = [[Image:Hotrod.png|left|320px|link=Engineer]] | ||
+ | {{User Item|name=Rescue Ranger|quality=Strange}} | ||
+ | {{User Item|name=Short Circuit}} | ||
+ | {{User Item|name=Southern Hospitality|quality=Strange}} | ||
+ | |||
+ | {{User Item|name=Hotrod}} | ||
+ | {{User Item|name=Ein|quality=Strange}} | ||
+ | {{User Item|name=Balloonicorn}} | ||
+ | |||
+ | | medic = [[Image:Mustachioed Mann.png|left|335px|link=Medic]] | ||
+ | {{User Item|name=Crusader's Crossbow}} | ||
+ | {{User Item|name=Medi Gun|quality=Strange}} | ||
+ | {{User Item|name=Amputator}} | ||
+ | |||
+ | {{User Item|name=That '70s Chapeau}} | ||
+ | {{User Item|name=Mustachioed Mann|quality=Strange}} | ||
+ | {{User Item|name=Balloonicorn}} | ||
+ | |||
+ | | sniper = [[Image:Outback Intellectual.png|left|310px|link=Sniper]] | ||
+ | {{User Item|name=Huntsman}} | ||
+ | {{User Item|name=Jarate|quality=Strange}} | ||
+ | {{User Item|name=Bushwacka|quality=Strange}} | ||
+ | |||
+ | {{User Item|name=Professional's Panama|quality=Vintage}} | ||
+ | {{User Item|name=Outback Intellectual|quality=Strange}} | ||
+ | {{User Item|name=Balloonicorn}} | ||
+ | |||
+ | | spy = [[Image:Blood Banker.png|left|310px|link=Spy]] | ||
+ | {{User Item|name=Revolver}} | ||
+ | {{User Item|name=Cloak and Dagger}} | ||
+ | {{User Item|name=Spy-cicle}} | ||
+ | {{User Item|name=Sapper}} | ||
+ | {{User Item|name=That '70s Chapeau}} | ||
+ | {{User Item|name=Professor Speks|quality=Strange}} | ||
+ | {{User Item|name=Balloonicorn}} | ||
+ | }} | ||
==Infobox== | ==Infobox== | ||
+ | The old one. I still like it. | ||
{{User infobox | {{User infobox |
Latest revision as of 18:03, 31 March 2018
User page | Talk | Sandbox | Contributions | Wiki-Fi stats | Steam | Backpack | Stats |
This is my Sandbox. Suggestions that are made to improve the pages are welcome.
Contents
Script
Learning HTML/CSS, and starting Python. Baby steps.
SignaBot
I have an idea for a bot, if it were accepted here. Its task would be to add signatures that users have forgotten in talk or discussion pages. Origionally from JackBot of Wiktionary. Read source to see code.
UserBoxes
These are userboxes that I've created.
Patches
Community Events
|
|
| ||||||||||||
|
|
|
Personal
|
Achievements
|
|
| ||||||
|
|
| ||||||
|
|
Loadout
I'll decide sometime where I want to put this.
Infobox
The old one. I still like it.
DC64 | |
---|---|
Basic information | |
Native language: | English |
Team Fortress 2 | |
Favourite classes: | · |
Favourite weapons: | Backburner |
Favourite hats: | |
Contact information | |
Steam page: | DC64 |
IRC nickname: | DC64 |