Revision: 7892
Author: xqt
Date: 2010-01-26 11:39:04 +0000 (Tue, 26 Jan 2010)
Log Message:
-----------
fixing_redirects: do not show content around the link. Use showDiff since we run in
autonomous mode;
solve_disambiguation: additional exceptions, do no show content around the link if we do
-always the same.
Modified Paths:
--------------
trunk/pywikipedia/fixing_redirects.py
trunk/pywikipedia/solve_disambiguation.py
Modified: trunk/pywikipedia/fixing_redirects.py
===================================================================
--- trunk/pywikipedia/fixing_redirects.py 2010-01-25 12:56:41 UTC (rev 7891)
+++ trunk/pywikipedia/fixing_redirects.py 2010-01-26 11:39:04 UTC (rev 7892)
@@ -97,7 +97,7 @@
context = 15
# at the beginning of the link, start red color.
# at the end of the link, reset the color to default
- wikipedia.output(text[max(0, m.start() - context) : m.start()] +
'\03{lightred}' + text[m.start() : m.end()] + '\03{default}' +
text[m.end() : m.end() + context])
+ #wikipedia.output(text[max(0, m.start() - context) : m.start()] +
'\03{lightred}' + text[m.start() : m.end()] + '\03{default}' +
text[m.end() : m.end() + context])
choice = 'y'
# The link looks like this:
@@ -163,6 +163,7 @@
text = treat(text, page2, target)
if text != page.get():
comment = wikipedia.translate(mysite, msg)
+ wikipedia.showDiff(page.get() ,text)
try:
page.put(text, comment)
except (wikipedia.Error):
Modified: trunk/pywikipedia/solve_disambiguation.py
===================================================================
--- trunk/pywikipedia/solve_disambiguation.py 2010-01-25 12:56:41 UTC (rev 7891)
+++ trunk/pywikipedia/solve_disambiguation.py 2010-01-26 11:39:04 UTC (rev 7892)
@@ -248,14 +248,22 @@
],
'de': [
u'.+/Archiv.*',
+ u'.+/[aA]rchiv.*',
+ u'.+/Baustelle.*',
u'.+/Spielwiese',
+ u'.+/[tT]est.*',
+ u'Benutzer:.+/[Ll]og.*',
u'Benutzer:C.Löser/.+',
u'Benutzer:Katharina/Begriffsklärungen',
u'Benutzer:Kirschblut/.+buchstabenkürzel',
u'Benutzer:Mathias Schindler/.+',
u'Benutzer:Noisper/Dingliste/[A-Z]',
+ u'Benutzer:Professor Einstein.*'
+ u'Benutzer:Sebbot/.+',
u'Benutzer:SirJective/.+',
- u'Benutzer:SrbBot/Index/.+',
+ u'Benutzer:Srbauer.*',
+ u'Benutzer:Steindy.*',
+ u'Benutzer:SrbBot.*',
u'Benutzer:PortalBot/.+',
u'Benutzer:Xqbot/.+',
u'Benutzer Diskussion:.+',
@@ -263,6 +271,7 @@
u'Liste griechischer Wortstämme in deutschen Fremdwörtern',
u'Liste von Gräzismen',
u'Portal:Abkürzungen/.+',
+ u'Portal:Astronomie/Moves',
u'Wikipedia:Administratoren/Anfragen',
u'Wikipedia:Archiv/.+',
u'Wikipedia:Artikelwünsche/Ding-Liste/[A-Z]',
@@ -650,11 +659,10 @@
# Highlight the title in purple.
pywikibot.output(u"\n\n>>>
\03{lightpurple}%s\03{default} <<<" % refPage.title())
- # at the beginning of the link, start red color.
- # at the end of the link, reset the color to default
- pywikibot.output(text[max(0, m.start() - context) : m.start()] +
'\03{lightred}' + text[m.start() : m.end()] + '\03{default}' +
text[m.end() : m.end() + context])
-
if not self.always:
+ # at the beginning of the link, start red color.
+ # at the end of the link, reset the color to default
+ pywikibot.output(text[max(0, m.start() - context) : m.start()] +
'\03{lightred}' + text[m.start() : m.end()] + '\03{default}' +
text[m.end() : m.end() + context])
if edited:
choice = pywikibot.input(u"Option (#, r#, [s]kip link,
[e]dit page, [n]ext page, [u]nlink, [q]uit\n"
" [m]ore context, [l]ist,
[a]dd new, x=save in this form):")