Utente:Sirbot/Script: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
→monitoraggiotest.py: fix |
|||
Riga 141:
print e # Print the error and skip
continue
newTalkText = re.sub('\|\n? *?[Ii]mmagini ?= *?\n', '|immagini=d\n', talkText)
if talkText != newTalkText:
wikipedia.showDiff(talkText, newTalkText)
Riga 164:
print e # Print the error and skip
continue
newTalkText = re.sub('\|\n? *?[Ii]mmagini ?= ?d\n', '|immagini= \n', talkText)
if talkText != newTalkText:
wikipedia.showDiff(talkText, newTalkText)
Riga 188:
print e # Print the error and skip
continue
newTalkText = re.sub('\|\n? *?[Ff]onti ?= *?\n', '|fonti=d\n', talkText)
if talkText != newTalkText:
wikipedia.showDiff(talkText, newTalkText)
Riga 211:
print e # Print the error and skip
continue
newTalkText = re.sub('\|\n? *?[Ff]onti ?= ?d\n', '|fonti= \n', talkText)
if talkText != newTalkText:
wikipedia.showDiff(talkText, newTalkText)
Riga 235:
print e # Print the error and skip
continue
newTalkText = re.sub('\|\n? *?[Aa]ccuratezza ?= *?\n', '|accuratezza=a\n', talkText)
if talkText != newTalkText:
wikipedia.showDiff(talkText, newTalkText)
Riga 248:
try:
page.put(newTalkText, u'[[WP:BOT|Bot]]: Voce in vetrina: completezza "a"')
except wikipedia.Error, e:▼
print e # Print the error and skip▼
continue▼
match = re.search('(\{\{[Ss]\|)', pageText, re.IGNORECASE)▼
if match is not None:▼
talkText = page.get()▼
except wikipedia.Error, e:▼
print e # Print the error and skip▼
newTalkText = re.sub('\|\n? *?[Aa]ccuratezza=.*?\n', '|accuratezza=c\n', talkText)▼
if talkText != newTalkText:▼
wikipedia.showDiff(talkText, newTalkText)▼
except wikipedia.Error, e:
print e # Print the error and skip
continue
if match == None:
match = re.search('(\{\{[Ss]\|)', pageText, re.IGNORECASE)
if match is not
wikipedia.output(">>>>> %s <<<<<" %
except wikipedia.Error,
▲ print e # Print the error and skip
newTalkText = re.sub('\|\n? *?[Aa]ccuratezza= ?c\n', '|accuratezza= \n', talkText)▼
▲ newTalkText = re.sub('\|\n? *?[Aa]ccuratezza ?=.*?\n', '|accuratezza=c\n', talkText)
if talkText !=
choice = wikipedia.inputChoice(u"Apply the changes?", ['Yes', 'No', 'All'], ['y', 'N', 'a'], 'N')
if choice in
except wikipedia.Error,
▲ print e # Print the error and skip
▲ match = re.search('(\{\{[Aa]\|)', pageText, re.IGNORECASE)
if match is not
▲ except wikipedia.Error, e:
newTalkText = re.sub('\|\n? *?[Aa]ccuratezza= *?\n', '|accuratezza=d\n', talkText)▼
▲ if talkText != newTalkText:
if not
choice = 'y'
if choice in ['
choice =
if choice in
print e # Print the error and skip
if match
if not
choice = 'y'
if choice in ['
choice =
if choice in
▲ except wikipedia.Error, e:
print e # Print the error and skip
▲ continue
match = re.search('(\{\{[Dd]a correggere)', pageText, re.IGNORECASE)
if match is not None:
Line 353 ⟶ 332:
print e # Print the error and skip
continue
newTalkText = re.sub('\|\n? *?[Ss]crittura ?= *?\n', '|scrittura=d\n', talkText)
if talkText != newTalkText:
wikipedia.showDiff(talkText, newTalkText)
|