Hi all,
how to go through all the mediawiki pages creates and report if any of them are non-categorized along with the last contributor's name (This will automate a reminder to send an email to remind to categorize that page) ?
Thanks,
Alex
Hi all,
how to go through all the mediawiki pages creates and report if any of them are non-categorized along with the last contributor's name (This will automate a reminder to send an email to remind to categorize that page) ?
Thanks,
Alex
You could look at [[Special:UncategorizedPages]] and then pull the last contributor for each page. This shouldn't be to hard to write using a bot.
Code sample for Pywikibot/core:
# -*- coding: utf-8 -*-
import pywikibot
# site configuration goes here, example:
# site = pywikibot.Site('yourlang', 'yourfamily')
for page in site.uncategorizedpages(total=5): # goes on 5 uncategorized pages
if page.isIpEdit() is False: # check that the last contributor is registered
user = pywikibot.User(site, page.userName())
user.sendMail(u'The page "{}" is uncategorized'.format(page.title()), u'Please add a category to it.')