User:DarkJedi613 bot
From Harry Potter Wiki
| ||
|
- "Think of it as a House-elf that can clean up all the little things (or even big things) in the wiki."
- —Cavalier One
User:DarkJedi613 bot is a Bot (read: automated user) controlled (hopefully) by DarkJedi613 to perform mundane tasks on Harry Potter Wiki. He does automated tasks such as moving a categories to a new name, or changing all references to the Sorceror's Stone to Philosopher's Stone, or other maintenance tasks across the wiki. He is powered by the Pywikipedia bot framework. Please use this talk page if you have an questions/comments/requests. Thanks!
See his recent edits.
Contents |
[edit] Tasks
[edit] Current
- Misspellings
- née --> neé
- replace.py -start:! -always neé née
- British spellings
- replace.py -start:! -always "Sibyll Trelawney" "Sybill Trelawney"
- replace.py -start:! -always -excepttitle:"Minister for Magic" "Minister of Magic" "Minister for Magic"
- replace.py -start:! -always "Defense Against the Dark Arts" "Defence Against the Dark Arts"
- replace.py -start:! -always -excepttitle:"Harry Potter and the Philosopher's Stone" -excepttitle:"J. K. Rowling" -excepttitle:1998 -excepttitle:"Harry Potter books" "Sorcerer's Stone" "Philosopher's Stone"
- née --> neé
- Enforce policy
- Layout
- replace.py -start:! -always -nocase -regex "== ?(In the real world|Trivia|Behind the Scenes) ?==" "==Behind the scenes=="
- replace.py -start:! -always -regex "(={1,7}) +(.+) +\1" "\1\2\1"
- replace.py -start:! -always -regex "([\s\S]*){{(FA|fa)}}([\s\S]*)" "{{FA}}\n\1\3"
- replace.py -start:! -always -regex "(<small>)?<references ?/>(</small>)?" "{{reflist}}"
- replace.py -start:! -always -nocase -regex "=+ *References *=+" "==Notes and references=="
- Layout
[edit] Future
- "Correct" American spellings
- Bertie Bott's Every Flavour Beans
- Second Battle of Hogwarts --> Battle of Hogwarts
[edit] Old
- Move Category:Organizations --> Category:Organisations
- Disambiguations for Tom Riddle, Arcturus Black and Cygnus Black
- replace.py -start:! -always "Organization infobox" "Organisation infobox"
- replace.py -start:! -always -nocase "{{Featured article}}" "{{FA}}"
[edit] Bot Settings
First off make sure the bot's account preferences are set to use MonoBook as a skin.
[edit] user-config.py
Placed in pywikipedia
#pywikipedia bot settings import os, re, sys family = 'harrypotter' mylang = 'en' usernames['harrypotter']['en'] = 'DarkJedi613 bot' minthrottle = 1 maxthrottle = 4 put_throttle = 4 noisysleep = 2.0 #General Settings #Do not ring bell on expected input ring_bell = False
[edit] wikipedia.py
Placed in pywikipedia (Originally seen at Memory Alpha Bots)
- Find:
return self._putPage(newtext, comment, watchArticle, minorEdit,
- Directly above that line insert the following (make sure the indention is the same as the return line you found):
# This is a fix to make the bot work properly with the behaviour of Wikia's [[Special:Export]]
# which adds a "credit line" to the XML dump:
# <div id="wikia-credits">SOME CREDITS HERE</div>
# ATT: This assumes that this id is NOT used in the article text itself!
newtext = re.sub(r'\<div id=\"wikia-credits\"\>.*\<\/div\>','',newtext)
comment = comment+' !!wikia-credits fix!!'
[edit] harrypotter_family.py
Placed in pywikipedia/families
import family
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = 'harrypotter'
self.langs = {
'en': None,
}
# Most namespaces are inherited from family.Family.
self.namespaces[4] = {
'_default': u'Harry Potter Wiki',
}
self.namespaces[5] = {
'_default': u'Harry Potter Wiki talk',
}
self.namespaces[110] = {
'_default': u'Forum',
}
self.namespaces[111] = {
'_default': u'Forum talk',
}
# A few selected big languages for things that we do not want to loop over
# all languages. This is only needed by the titletranslate.py module, so
# if you carefully avoid the options, you could get away without these
# for another wiki family.
self.languages_by_size = ['en']
def hostname(self,code):
return 'harrypotter.wikia.com'
def path(self, code):
return '/index.php'
def version(self, code):
return "1.9"
[edit] Awards
| Order of Merlin (Third Class) | |
| The Order of Merlin is awarded to you by Freakatone for having over one-thousand edits on the Harry Potter Wiki. |