Topic on Project:Support desk/Flow

Listing pages with no category

3
212.35.114.12 (talkcontribs)

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

MarkAHershberger (talkcontribs)

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.

Ricordisamoa (talkcontribs)

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.')
Reply to "Listing pages with no category"