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)
Nemo_bis created this task.Feb 24 2015, 8:25 AM
Nemo_bis claimed this task.
Nemo_bis added subscribers: Nemo_bis, GerardM.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 24 2015, 8:25 AM

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

Nemo_bis closed this task as "Resolved".Apr 26 2015, 8:33 AM

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