Create list of recent contributors of a MediaWiki instance

For one of the wikis I am maintaining, we needed to contact the people who contributed less than “X” days ago. I quickly checked the MediaWiki REST-based API, but I didn’t seem easy or feasible, so I did it in SQL:

  u.user_email as email,
  max(r.rev_timestamp) as last_change
from revision r, user u
  r.rev_user = u.user_id
group by u.user_email;

Import the result in Excel, transform the MediaWiki timestamp to an Excel date, using the following formula:


From that point on, it’s trivial to compute the age in days, sort and export.

This entry was posted in Web. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s