Revision: 5918
Author: multichill
Date: 2008-09-26 12:23:06 +0000 (Fri, 26 Sep 2008)
Log Message:
-----------
Do a dummy edit on every category to clean up [[Category:Non-empty category redirects]] (also the categories in cooldown, they might be empty).
Modified Paths:
--------------
trunk/pywikipedia/commons_category_redirect.py
Modified: trunk/pywikipedia/commons_category_redirect.py
===================================================================
--- trunk/pywikipedia/commons_category_redirect.py 2008-09-24 15:26:18 UTC (rev 5917)
+++ trunk/pywikipedia/commons_category_redirect.py 2008-09-26 12:23:06 UTC (rev 5918)
@@ -75,11 +75,11 @@
catlib.change_category(cat, old_category, destination, move_message % (old_category.title(), old_category.titleWithoutNamespace(), destination.title(), destination.titleWithoutNamespace()))
except wikipedia.IsRedirectPage:
wikipedia.output(page.title() + u' is a redirect!')
- #Dummy edit to refresh the page, shouldnt show up in any logs.
- try:
- old_category.put(old_category.get())
- except:
- wikipedia.output(u'Dummy edit at ' + old_category.title() + u' failed')
+ #Dummy edit to refresh the page, shouldnt show up in any logs.
+ try:
+ old_category.put(old_category.get())
+ except:
+ wikipedia.output(u'Dummy edit at ' + old_category.title() + u' failed')
if __name__ == "__main__":
try:
I'm trying to set up both MediaWiki and PyWikipediaBot and am
running into some teething problems.
My MW instance is installed (and appears to be functioning). I
created an account named ProtegeBot and put it in the Bot group.
I also created the following files:
$ cat user-config.py
mylang = 'en'
usernames['PrF']['en'] = u'ProtegeBot'
family = 'PrF'
$ cat families/PrF_family.py
# -*- coding: utf-8 -*-
import family
# Rich Morin's test wiki for SMI-related hacks.
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = 'PrF'
self.langs = { 'en': 'www.cfcl.com' }
self.namespaces[4] = {
'_default': [u'ProtegeWiki', self.namespaces[4]['_default']],
}
self.namespaces[5] = {
'_default': [u'ProtegeWiki talk', self.namespaces[5]['_default']],
}
self.content_id = "mainContent"
def RversionTab(self, code):
return r'<li\s*><a
href=".*?title=.*?&action=history".*?>.*?</a></li>'
def version(self, code):
return "1.13.1"
def scriptpath(self, code):
return '/smi_xmw/mediawiki-1.13.1/index.php'
def apipath(self, code):
raise NotImplementedError(
"The PrF family does not support api.php")
I am able to log into the Wiki as ProtegeBot, using the password I set.
However, when I try to run PyWikipediaBot, I get this error:
$ python upload.py -v $D/All_ProtegeLogo.gif
Checked for running processes. 1 processes currently running,
including the current process.
Pywikipediabot [http] trunk/pywikipedia (r5914, Sep 22 2008, 16:15:37)
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)]
Getting information for site PrF:en
Password for user ProtegeBot on PrF:en:
Logging in to PrF:en as ProtegeBot
Login failed. Wrong password or CAPTCHA answer?
Password for user ProtegeBot on PrF:en:
Help?
-r
P.S. I'm not sure about the difference between the "family" name and the
"sitename", so I used PrF for both. LocalSettings.php sez:
$wgSitename = "PrF";
--
http://www.cfcl.com/rdm Rich Morin
http://www.cfcl.com/rdm/resume rdm(a)cfcl.com
http://www.cfcl.com/rdm/weblog +1 650-873-7841
Technical editing and writing, programming, and web development
Patches item #2128343, was opened at 2008-09-25 21:38
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2128343&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Woo-Jin Kim (kwj2772)
Assigned to: Nobody/Anonymous (nobody)
Summary: checkimages.py - localization for ko changed
Initial Comment:
Some localizations are located in incorrect place and some message templates are moved.
URL
http://ko.wikipedia.org/wiki/User:Kwj2772/Checkimages.py
Thank you
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2128343&group_…
Patches item #2126564, was opened at 2008-09-24 16:49
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2126564&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Translations
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Thomas Andrew (broadbeer)
Assigned to: Nobody/Anonymous (nobody)
Summary: Changed danish description
Initial Comment:
For information purpose I have changed the danish description for clean_sandbox.py
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2126564&group_…
Feature Requests item #2125042, was opened at 2008-09-23 22:55
Message generated for change (Comment added) made by rubin16
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2125042&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Linar Khalitov (rubin16)
Assigned to: Nobody/Anonymous (nobody)
Summary: featured.py
Initial Comment:
The script places {{Link FA|language}} near the interwiki link if the article is a featured article in that wikipedia.
It would be nice if the bot wouldn't only add this template but also remove it when the article loses its featured status.
This will help to avoid such situations as
http://ru.wikipedia.org/w/index.php?title=0,(9)&curid=354454&diff=11094819&…
(here you can see the work of good.py, but it's based on the same system as featured.py).
Is it possible to add such function?
Thanks a lot.
----------------------------------------------------------------------
>Comment By: Linar Khalitov (rubin16)
Date: 2008-09-24 15:21
Message:
File Added: featured.py
----------------------------------------------------------------------
Comment By: Linar Khalitov (rubin16)
Date: 2008-09-24 15:19
Message:
I've changed the script a bit. As far as I am concerned this will prevent
the bot from adding {{Link FA}} template if there already was {{Link GA}}
template.
<code>
if atrans:
text=atrans.get()
m=re_Link_FA.search(text)
#added
good=re_Link_GA.search(text)
if m:
wikipedia.output(u"(already done)")
#added
if good:
wikipedia.output(u"(GOOD ARTICLE)")
else:
</code>
But this is not a complete decision: the best way is to overwrite the old
template by new one but I don't know how to do it.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2125042&group_…
Feature Requests item #2125042, was opened at 2008-09-23 22:55
Message generated for change (Comment added) made by rubin16
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2125042&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Linar Khalitov (rubin16)
Assigned to: Nobody/Anonymous (nobody)
Summary: featured.py
Initial Comment:
The script places {{Link FA|language}} near the interwiki link if the article is a featured article in that wikipedia.
It would be nice if the bot wouldn't only add this template but also remove it when the article loses its featured status.
This will help to avoid such situations as
http://ru.wikipedia.org/w/index.php?title=0,(9)&curid=354454&diff=11094819&…
(here you can see the work of good.py, but it's based on the same system as featured.py).
Is it possible to add such function?
Thanks a lot.
----------------------------------------------------------------------
>Comment By: Linar Khalitov (rubin16)
Date: 2008-09-24 15:19
Message:
I've changed the script a bit. As far as I am concerned this will prevent
the bot from adding {{Link FA}} template if there already was {{Link GA}}
template.
<code>
if atrans:
text=atrans.get()
m=re_Link_FA.search(text)
#added
good=re_Link_GA.search(text)
if m:
wikipedia.output(u"(already done)")
#added
if good:
wikipedia.output(u"(GOOD ARTICLE)")
else:
</code>
But this is not a complete decision: the best way is to overwrite the old
template by new one but I don't know how to do it.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2125042&group_…
Feature Requests item #2125042, was opened at 2008-09-23 22:55
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2125042&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Linar Khalitov (rubin16)
Assigned to: Nobody/Anonymous (nobody)
Summary: featured.py
Initial Comment:
The script places {{Link FA|language}} near the interwiki link if the article is a featured article in that wikipedia.
It would be nice if the bot wouldn't only add this template but also remove it when the article loses its featured status.
This will help to avoid such situations as
http://ru.wikipedia.org/w/index.php?title=0,(9)&curid=354454&diff=11094819&…
(here you can see the work of good.py, but it's based on the same system as featured.py).
Is it possible to add such function?
Thanks a lot.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2125042&group_…