[go: up one dir, main page]

Page MenuHomePhabricator

Automate wikistats commands
Open, Needs TriagePublic

Description

For non-wikipedias where the wikipedia exists, this can be done.

/usr/bin/mysql < insert into <FAMILY> (prefix, lang, loclang, method) select prefix,lang,loclang,method from wikipedias where prefix=<PREFIX>;
/usr/lib/wikistats/update.php wX prefix <PREFIX>

There's only 1 item there that changes for each. You could add a bash script that takes family & prefix to automate. Maybe even add it to Maint-Bot then as the family is easy to pull.

For wikipedias or where there is not an existing Wikipedia:

insert into <FAMILY> (prefix, lang, loclang, method) values (<PREFIX>, <LANG>, <LOCLANG>, 8);
/usr/lib/wikistats/update.php wX prefix <PREFIX>

This can be mostly taken from the ticket except LOCLANG

For specials, the table is completely different but they are more rare.

Event Timeline

For non-wikipedias where the wikipedia exists, this can be done.

What about Wikipedias where another project in that language exists? We currently have two Wiktionaries that don't (yet) have a corresponding Wikipedia: shywiktionary and btmwiktionary

For non-wikipedias where the wikipedia exists, this can be done.

What about Wikipedias where another project in that language exists? We currently have two Wiktionaries that don't (yet) have a corresponding Wikipedia: shywiktionary and btmwiktionary

The bit below, you just can't copy the data from the existing tables.

prefix, lang & loclang should be the same for every project. They could probably be split into another table. That's a bigger task though that involves rewriting code. Don't want to blow too much up yet.

Mentioned in SAL (#wikimedia-cloud) [2023-08-30T11:00:53Z] <RhinosF1> create langdata table from wikipedias T345235

Is this really automating it though? I mean, sure, putting the commands into a script will make it a little easier but end of the day you are still manually running a (single) command and you have to react to a wiki creation task being resolved.

Real automation would be something like a timer looking at new emails on the "newprojects" mailing list, extracting the project name and language and then adding it. Even that seems quite do-able if the language itself already exists. It gets trickier though for a new language; would have to also extract that from the ISO website ... but not impossible.