[Pywikipedia-l] SVN: [4923] trunk/pywikipedia/add_text.py
filnik at svn.wikimedia.org
filnik at svn.wikimedia.org
Tue Jan 22 14:57:59 UTC 2008
Revision: 4923
Author: filnik
Date: 2008-01-22 14:57:59 +0000 (Tue, 22 Jan 2008)
Log Message:
-----------
Bugfix, replaceCategoryLinks() will only add the category, not replace them
Modified Paths:
--------------
trunk/pywikipedia/add_text.py
Modified: trunk/pywikipedia/add_text.py
===================================================================
--- trunk/pywikipedia/add_text.py 2008-01-22 14:57:27 UTC (rev 4922)
+++ trunk/pywikipedia/add_text.py 2008-01-22 14:57:59 UTC (rev 4923)
@@ -174,7 +174,7 @@
# Adding the text
newtext += u"\n%s" % addText
# Reputting the categories
- newtext = wikipedia.replaceCategoryLinks(newtext, categoriesInside, site)
+ newtext = wikipedia.replaceCategoryLinks(newtext, categoriesInside, site, True)
# Dealing the stars' issue
starsListInPage = list()
for star in starsList:
@@ -189,7 +189,7 @@
# If instead the text must be added above...
else:
newtext = addText + '\n' + text
- if putText:
+ if putText and text != newtext:
wikipedia.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % page.title())
wikipedia.showDiff(text, newtext)
choice = ''
More information about the Pywikipedia-l
mailing list