Revision: 8590 Author: xqt Date: 2010-09-22 05:10:49 +0000 (Wed, 22 Sep 2010)
Log Message: ----------- easier merging to rewrite branch
Modified Paths: -------------- trunk/pywikipedia/category.py trunk/pywikipedia/category_redirect.py
Modified: trunk/pywikipedia/category.py =================================================================== --- trunk/pywikipedia/category.py 2010-09-22 05:07:29 UTC (rev 8589) +++ trunk/pywikipedia/category.py 2010-09-22 05:10:49 UTC (rev 8590) @@ -419,15 +419,15 @@ except pywikibot.NoPage: if self.create: pywikibot.output(u"Page %s doesn't exist yet; creating." - % (page.aslink())) + % (page.title(asLink=True))) text = '' else: pywikibot.output(u"Page %s does not exist; skipping." - % page.aslink()) + % page.title(asLink=True)) except pywikibot.IsRedirectPage: redirTarget = pywikibot.Page(site, arg.args[0]) pywikibot.output(u"WARNING: Page %s is a redirect to %s; skipping." - % (page.aslink(), redirTarget.aslink())) + % (page.title(asLink=True), redirTarget.title(asLink=True))) else: return text return None @@ -460,7 +460,7 @@ minorEdit=minorEdit, botflag=botflag) except pywikibot.LockedPage: pywikibot.output(u"Page %s is locked; skipping." - % page.aslink()) + % page.title(asLink=True)) except pywikibot.EditConflict: pywikibot.output( u'Skipping %s because of edit conflict' @@ -493,11 +493,12 @@ else: if self.sort: catpl = self.sorted_by_last_name(catpl, page) - pywikibot.output(u'Adding %s' % catpl.aslink()) + pywikibot.output(u'Adding %s' % catpl.title(asLink=True)) cats.append(catpl) text = pywikibot.replaceCategoryLinks(text, cats) if not self.save(text, page, self.editSummary): - pywikibot.output(u'Page %s not saved.' % page.aslink()) + pywikibot.output(u'Page %s not saved.' + % page.title(asLink=True))
class CategoryMoveRobot:
Modified: trunk/pywikipedia/category_redirect.py =================================================================== --- trunk/pywikipedia/category_redirect.py 2010-09-22 05:07:29 UTC (rev 8589) +++ trunk/pywikipedia/category_redirect.py 2010-09-22 05:10:49 UTC (rev 8590) @@ -219,32 +219,33 @@ # an update due to changes in a transcluded template article.put(newtext, comment) if newtext == oldtext: - pywikibot.output( - u'No changes in made in page %s.' % article.aslink()) + pywikibot.output(u'No changes in made in page %s.' + % article.title(asLink=True)) return False return True except pywikibot.EditConflict: - pywikibot.output( - u'Skipping %s because of edit conflict' % article.aslink()) + pywikibot.output(u'Skipping %s because of edit conflict' + % article.title(asLink=True)) except pywikibot.LockedPage: - pywikibot.output(u'Skipping locked page %s' % article.aslink()) - self.edit_requests.append((article.aslink(), + pywikibot.output(u'Skipping locked page %s' + % article.title(asLink=True)) + self.edit_requests.append((article.title(asLink=True), oldCat.aslink(textlink=True), newCat.aslink(textlink=True))) except pywikibot.SpamfilterError, error: pywikibot.output( u'Changing page %s blocked by spam filter (URL=%s)' - % (article.aslink(), error.url)) + % (article.title(asLink=True), error.url)) except pywikibot.NoUsername: pywikibot.output( u"Page %s not saved; sysop privileges required." - % article.aslink()) + % article.title(asLink=True)) self.edit_requests.append((article.aslink(textlink=True), oldCat.aslink(textlink=True), newCat.aslink(textlink=True))) except pywikibot.PageNotSaved, error: pywikibot.output(u"Saving page %s failed: %s" - % (article.aslink(), error.message)) + % (article.title(asLink=True), error.message)) return False
def move_contents(self, oldCatTitle, newCatTitle, editSummary):
pywikipedia-svn@lists.wikimedia.org