Permalink
Browse files

Added more descriptive summaries

and fixed some wierd error with includes.py
  • Loading branch information...
sdamashek committed Dec 31, 2012
1 parent ef6d8c3 commit dd3eb0075d43bf3b3baec789435055520738ee29
Showing with 3 additions and 2 deletions.
  1. +2 −1 bot.py
  2. +1 −1 includes.py
View
3 bot.py
@@ -52,9 +52,10 @@
}}<noinclude>
{{documentation}}
</noinclude>""" #Define template, adding in values
summary = """Updating Vandalism Information Template - Edit Count: """ + str(theTuple[0]) + """ - Revert Count: """ + str(theTuple[1]) + """ - ([[Wikipedia:Bots/Requests for approval/VoxelBot|bot on trial]])"""
print edit #Print for Debugging
editInfo = url.Request("http://en.wikipedia.org/w/api.php", urllib.urlencode({"format": "xml", "action": "edit", "token": x, "summary": "Updating Vandalism Information Template ([[Wikipedia:Bots/Requests for approval/VoxelBot|bot on trial]])", "text": edit, "bot": "true", "title": "Template:Vandalism information"})) #Define the edit query and execute it
editInfo = url.Request("http://en.wikipedia.org/w/api.php", urllib.urlencode({"format": "xml", "action": "edit", "token": x, "summary": summary, "text": edit, "bot": "true", "title": "Template:Vandalism information"})) #Define the edit query and execute it
response = ClientCookie.urlopen(editInfo).read() #Get the response
print response #Print for debugging
else:
View
@@ -41,4 +41,4 @@ def getSummaries(thatAreVandalism):
for i in summaries:
if classifyEdit(i) == thatAreVandalism:
e.append(i+"\n\n")
return e
return e

0 comments on commit dd3eb00

Please sign in to comment.