Python talk:Welcome.py
From Botwiki
I was wondering... We're compiling a list of unwanted words here. Shouldn't we put those in a seperate dictionary file? Siebrand 14:07, 29 May 2007 (UTC)
Contents |
[edit] Not adapted username List
Can i add some Albanian bad usernames here, because i would not to insert them into Wikipedia? (Words not adapted to an Encyclopedia.) --Eagleal 17:37, 29 May 2007 (UTC)
- Maybe it's better that you add them in your file, no? :-) However, ask siebrand ;-) --Filnik 17:39, 29 May 2007 (UTC)
- You're right :) --Eagleal 17:46, 29 May 2007 (UTC)
[edit] Errors in version 00:25, 1 June 2007 (UTC)
Not commited the commit request. Current version is seriously bugged.
Commons:
Loaded all users... Target link 'Wikipedia:Benvenuto log/User' has different family 'wikipedia' Exception in Page constructor site=commons:commons, title=Wikipedia:Benvenuto log/User, insite=commons:commons, defaultNamespace=0 Traceback (most recent call last): File "D:\py\commons-pywikipedia\welcome.py", line 470, in <module> SignList = DefineSign(welcomesite, SignPage) File "D:\py\commons-pywikipedia\welcome.py", line 415, in DefineSign Page = wikipedia.Page(welcomesite, SignPage) File "D:\py\commons-pywikipedia\wikipedia.py", line 296, in __init__ self._site = getSite(otherlang, familyName) File "D:\py\commons-pywikipedia\wikipedia.py", line 3769, in getSite _sites[key] = Site(code=code, fam=fam, user=user) File "D:\py\commons-pywikipedia\wikipedia.py", line 2909, in __init__ raise KeyError("Language %s does not exist in family %s"%(self.lang,self.family.name)) KeyError: 'Language commons does not exist in family wikipedia'
nl.wikipedia:
Loaded all users... Traceback (most recent call last): File "D:\py\nl-pywikipedia\welcome.py", line 470, in <module> SignList = DefineSign(welcomesite, SignPage) File "D:\py\nl-pywikipedia\welcome.py", line 416, in DefineSign SignText = Page.get() File "D:\py\nl-pywikipedia\wikipedia.py", line 499, in get self._contents, self._isWatched, self.editRestriction = self.getEditPage(get_redirect = get_redirect, throttle = throttle, sysop = sysop, nofollow_redirects=nofollow_redirects) File "D:\py\nl-pywikipedia\wikipedia.py", line 609, in getEditPage raise NoPage(self.site(), self.aslink(forceInterwiki = True)) wikipedia.NoPage: (wikipedia:nl, u'[[nl:Wikipedia:Benvenuto log/User]]')
Please also watch your trailing whitespace. It is best stripped. Siebrand 00:25, 1 June 2007 (UTC)
[edit] commons:commons: The sign's list isn't available
D:\py\commons-pywikipedia>welcome.py Checked for running processes. 3 processes currently running, including the current process. Loading latest 50 new users from commons.wikimedia.org... Slfi has no contributions Wildlife_sound has no contributions Yr has no contributions Liamclarke has no contributions Cleto90 has no contributions Danikayak has no contributions CoverYourEyes has no contributions JUNIE20012003 has no contributions Kugi has no contributions Kurt_Hermann has no contributions Dr.elemental_y_querido_watson has no contributions AshleyMotownSP has no contributions AJackl has no contributions Fgl_9309 has no contributions Mkatsev has no contributions Bassamh has no contributions Angered has no contributions Jin_kan has no contributions Mangwanani has no contributions Gulielmus has no contributions Danielco has no contributions Loaded all users... The sign's list isn't available... using default sign... Sleeping 3600 seconds before rerun. 03 jun 2007 14:19:20 (UTC)
Is this a bug? If not, is the message necessary? Siebrand 14:29, 3 June 2007 (UTC)
- No, it's not a bug, if you don't have a sign list it appears :-) Question: does it happen also if you don't use -random? --Filnik 16:26, 24 June 2007 (UTC)
[edit] Plese add chinese and fix bug
logbook = { 'commons': u"Project:Welcome log" , 'ar': u'Project:سجل الترحيب', # no welcome log on de: 'de': None, 'en': u'Project:Welcome log', 'it': u'Project:Benvenuto log', 'nl': u'Project:Logboek welkom', 'no': u'Project:Velkomstlogg', 'sq': u'Project:Tung log', 'zh': u'Project:欢迎日志', } #The edit summary for the welcome message (e.g. Welcome!). summary = { 'commons':u'Welcome!', 'ar':u'مرحبا!', 'de':u'Herzlich willkommen!', 'en':u'Welcome!', 'it':u'Benvenuto!', 'nl':u'Welkom!', 'no':u'Velkommen!', 'sq':u'Tung', 'zh':u'欢迎!/歡迎!', } # The text for the welcome message (e.g. {{welcome}}) and %s at the end # that is your signature (the bot has a random parameter to add different # sign, so in this way it will change according to your parameters). netext = { 'commons':u'{{subst:welcome}}%s', 'ar':u'{{نسخ:مستخدم:Alnokta/ترحيب}}%s', 'de':u'{{subst:Hallo}} %s', 'en':u'{{subst:welcome}}%s', 'it':u'{{Template:Benvebot}} %s', 'nl':u'{{Welkomstbericht}}%s', 'no':u'{{subst:bruker:jhs/vk}}%s', 'sq':u'{{subst:tung}}%s', 'zh':u'{{subst:welcome}}%s', } # The edit summary for updating the welcome log (e.g. Updating log). summary2 = { 'commons':u'Updating log', 'ar':u'تحديث السجل', 'de':u'Aktualisiere Logdatei', 'en':u'Updating log', 'it':u'Aggiorno il log', 'nl':u'Logboek bijwerken', 'no':u'Oppdaterer logg', 'sq':u'Rifreskoj log', 'zh':u'日志更新', } # Contributions in the wiki language (e.g. Contribs). con = { 'commons':u'Contribs', 'ar':u'مساهمات', 'de':u'Beiträge', 'en':u'Contribs', 'it':u'Contributi', 'nl':u'Bijdragen', 'no':u'Bidrag', 'sq':u'Kontribute', 'zh':u'贡献', }
but run welcome.py -nlog :
http://botwiki.sno.cc/w/skins/common/images/button_sig.png
Firma con data e ora
D:\Python24>welcome.py -nlog
Checked for running processes. 2 processes currently running, including the curr
ent process.
Traceback (most recent call last):
File "D:\Python24\welcome.py", line 292, in ?
report_text = {
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc1 in position 3: ordinal
not in range(128)
--Shizhao 14:36, 24 June 2007 (UTC)
- You have an encoding problem, that means that you charachters aren't supported by utf-8. Try to change encoding because i see only "???" and i can do nothing. Sorry, --Filnik 16:26, 24 June 2007 (UTC)
[edit] VERY buggy
Siebrand 21:29, 1 July 2007 (UTC)
Loaded all users... Checked for running processes. 2 processes currently running, including the current process. Getting a page to check if we're logged in on commons:commons NOTE: You have unread messages on commons:commons Creating page [[commons:User talk:Jjdemo]] One user has been welcomed. Creating page [[commons:User talk:Muemmel123]] 2 users have been welcomed. Creating page [[commons:User talk:ðæÐÇð░ÐéÐâÐàð©ð¢ ðÉð¢ð┤ÐÇðÁð╣ ðÉð╗ðÁð║Ðüð░ð¢ð┤ÐÇð¥ð▓ð©Ðç]] 3 users have been welcomed. Creating page [[commons:User talk:Paolorausch]] 4 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Velma]] 5 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Erroscia]] 6 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Cristallium]] 7 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:WolfgangS]] 8 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Fpalang]] 9 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Haikur]] 10 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Imme├½mosol]] 11 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Cover]] 12 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Adezao]] 13 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Luiscastellanos]] 14 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Popperipopp]] 15 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Philip lamb]] 16 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:HammondCast]] 17 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Ming railway]] 18 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:BryceHarrington]] 19 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Qazwsx]] 20 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Lig├®rio]] 21 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Gertcuppens]] 22 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Marcello Gabbay]] 23 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Werner Steven]] 24 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Oddeivind]] 25 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Lector minimus]] 26 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Miraglobal]] 27 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Stefab]] 28 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Paleixmart]] 29 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Timesweeper]] 30 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:AndyB]] 31 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Ezacchi]] 32 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Hydrophil]] 33 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Greenmap]] 34 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Martinezmadril]] 35 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Checked for running processes. 2 processes currently running, including the current process. Creating page [[commons:User talk:Iikozen]] 36 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:FF orelive]] 37 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Letrado]] 38 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Michel Boutet]] 39 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Ostseekueste]] 40 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Paco Rodr├¡guez Risquete]] 41 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Toumoto]] 42 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Berserker.Entity]] 43 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Jriachi]] 44 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Panzer IV]] 45 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Tuk]] 46 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Chwech]] 47 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Tonyfroio]] 48 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Adrianoamalfi]] 49 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Creating page [[commons:User talk:Rockerkid26]] 50 users have been welcomed. Changing page [[commons:Commons:Welcome log/2007/07/1]] Putting the log of the latest 50 users... Checked for running processes. 2 processes currently running, including the current process. Changing page [[commons:Commons:Welcome log/2007/07/1]] Stop!
fixed --Filnik 19:39, 5 July 2007 (GMT)
[edit] Korean add
I add for korean. -- WonYong 21:29, 28 September 2007 (UTC)
http://botwiki.sno.cc/w/index.php?title=Python:Welcome.py&oldid=3720 -- Wybot 21:59, 28 September 2007 (UTC)
[edit] Problem with sq.wikipedia
I have a problem with this script. After check for users to welcome, the script tell me "There is no body to welcome". However in the wiki there are more than 500 users with an empty discussion page. Please help. --Eagleal 20:18, 10 May 2008 (UTC)
- Also when I use Save to File the index of welcomed users, it give me an error at line 957, full message:
Checked for running processes. 1 processes currently running, including the current process.
Loading the bad words list from sq.wikipedia.org...
Real-time list loaded.
Loading the whitelist from sq.wikipedia.org...
Real-time list loaded.
Traceback (most recent call last):
File "C:\pywikipedia\welcome3.py", line 957, in <module>
except wikipedia.BadTitle:
AttributeError: 'module' object has no attribute 'BadTitle'
--Eagleal 20:21, 10 May 2008 (UTC)
- Are you sure to have the latest version? My welcome.py works with your wiki:
fil@deed:~/Desktop/BOT/pywikipedia$ python welcome.py -lang:sq Checked for running processes. 1 processes currently running, including the current process. Loading latest 50 new users from sq.wikipedia.org... The5poon has enough edits to be welcomed
Then it crashes because I've not an account in sq wiki. But it gets the user. Maybe you have to update all the framework too :-) Manual:Speed_guide_for_pywikipediabot Here you can find the link where to update ;-) --Filnik 15:56, 11 May 2008 (UTC)
- Grazie Filnik, è che avevo una versione più vecchia (an early version) del pywiki fwk, non ci avevo pensato. Thanks now it works --Eagleal 22:17, 13 May 2008 (UTC)
- ;-) No problem, ciao, --Filnik 14:44, 16 May 2008 (UTC)
[edit] ga localization
Hi all,
I've updated Welcome.py for the Irish Language and right now, it's happily running away on the Irish Wikipedia and Wiktionary. I've filed a bug report on Sourceforge as I've no svn commit access, but can I actually update/submit the patch from here? - Alison 21:59, 7 January 2009 (UTC)
[edit] Error with german Wiki
I worked on this some hours now, but i cant figure out where it exactly comes from -.-
URL u'http://testwiki.iruel.de/Spezial:Beitr\xe4ge/Ballla' contains non-ASCII characters WARNING: Could not open 'http://testwiki.iruel.de/Spezial:Beiträge/Ballla'. Maybe the server or your connection is down. Retrying in 1 minutes...
The error is displayed correctly, the url not :(
i change following lines
pathWiki = '/'
ersatz = unicode('Spezial:Beiträge', 'utf-8')
con = '%s%s/%s' % (pathWiki, ersatz, userpage.urlname())
- line to make it work without "/wiki/" directory
- line added to make editing a litte easier (dosnt work with "= u'Spezial:Beiträge'" too!)
- line to include second line
contribs = (wsite.getUrl(con))
to
contribs = u'(wsite.getUrl(con))'
no error is displayed, but also no contributions are counted but there are some: Check
contribnum = contribs.count('<li class=')
back to
contribnum = contribs.count('<li>')
but nothing worked at all, any ideas? any help?
Thx
BlogMarks
del.icio.us
digg
Fark
Furl
Newsvine
reddit
Segnalo
Simpy
Slashdot
smarking
Spurl
Wists
