Page MenuHomePhabricator

Script to produce #target list of users for input languages
Closed, ResolvedPublic

Description

At some point (when stats stop improving as quickly) I want to send some messages to local users for http://laxstrom.name/blag/2015/02/19/prioritizing-mediawikis-translation-strings/ , à la legendary Siebrand's and GerardM's 2007–2009 updates.

I've used a few times something like

for dbname in $WIKIS;
do
  sql $dbname "select user_name from user JOIN user_groups on user_id = ug_user WHERE ug_group = 'sysop';" | sed 's/user_name//' | sed "s/^/$dbname   /g";
done;

but it can easily be improved by using the "wiki" table:

MariaDB [meta_p]> describe wiki;
+------------------+--------------+------+-----+---------+-------+
| Field            | Type         | Null | Key | Default | Extra |
+------------------+--------------+------+-----+---------+-------+
| dbname           | varchar(32)  | NO   | PRI | NULL    |       |
| lang             | varchar(12)  | NO   |     | en      |       |
| name             | text         | YES  |     | NULL    |       |
| family           | text         | YES  |     | NULL    |       |
| url              | text         | YES  |     | NULL    |       |
| size             | decimal(1,0) | NO   |     | 1       |       |
| slice            | text         | NO   |     | NULL    |       |
| is_closed        | decimal(1,0) | NO   |     | 0       |       |
| has_echo         | decimal(1,0) | NO   |     | 0       |       |
| has_flaggedrevs  | decimal(1,0) | NO   |     | 0       |       |
| has_visualeditor | decimal(1,0) | NO   |     | 0       |       |
| has_wikidata     | decimal(1,0) | NO   |     | 0       |       |
+------------------+--------------+------+-----+---------+-------+
12 rows in set (0.00 sec)

Event Timeline

Nemo_bis claimed this task.
Nemo_bis raised the priority of this task from to Medium.
Nemo_bis updated the task description. (Show Details)
Nemo_bis added a project: Tools.
Nemo_bis added subscribers: Nemo_bis, GerardM.

Change 206630 had a related patch set uploaded (by Nemo bis):
Script to produce #target list of users for input languages

https://gerrit.wikimedia.org/r/206630

I ended up doing something slightly more polished than a shell script. I also added it somewhere in gerrit for the archives' sake; if you find it useful please link it from places.

Change 206630 merged by Incola:
Script to produce #target list of users for input languages

https://gerrit.wikimedia.org/r/206630