Page MenuHomePhabricator

Magic word to output article count of remote wikis
Closed, ResolvedPublic

Description

Author: artslave

Description:
Would it be possible to have subdomain-specific article count variables? Something along
the lines of {{en:NUMBEROFARTICLES}}, or {{NUMBEROFARTICLES{{1}}}}, where a language code
could be entered as a parameter?

It would be a bonus if the user could specify a level of precision to which the number
could be rounded.

This would be very useful on the www.wikipedia.org portal, and probably several other Meta
and Foundation pages which are currently manually updated and always behind.


Version: unspecified
Severity: enhancement

Details

Reference
bz1534
ReferenceSource BranchDest BranchAuthorTitle
repos/search-platform/cirrus-streaming-updater!102work/ebernhardson/emitter-fixturesmainebernhardsonAdd fixture tests for elastic emitter
repos/search-platform/cirrus-streaming-updater!101work/ebernhardson/wiremock-mapping-jsonmainebernhardsonConsumer IT: Auto-fix generated wiremock mapping
repos/search-platform/cirrus-streaming-updater!95http-client-configmainpfischerLog HTTP client I/O config
repos/search-platform/cirrus-streaming-updater!93fetch-rerender-discard-ordermainpfischerAllow re-renders to be fetched out of order
trokhymovych/readability-liftwing!3add-threads-argmainisarantofeat: allow to set number of threads in catboost models
repos/cloud/cicd/gitlab-ci!24auto-toolforge-deploy-mrmainraymond-ndibe[toolforge,gitlab] run release before creating mr on toolforge-deploy
repos/search-platform/cirrus-streaming-updater!86set-bulk-flush-max-actionsmaindcausseElastic bulk actions: flush after 20 docs
Customize query in GitLab

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 8:14 PM
bzimport set Reference to bz1534.
bzimport added a subscriber: Unknown Object (MLST).
  • Bug 1564 has been marked as a duplicate of this bug. ***

For the Wikipedia portal, it would be more helpful to use the level of precision
to truncate the article count, rather than to round it. Also, Catherine's second
syntax proposal might be better written {{NUMBEROFARTICLES|{{1}}}} (with a pipe
in there).

It's really difficult to integrate, as the databases are distinct, and there's no SQL setup configured in
all projects to reach the statistics tables of each project. The only thing that exists is a table that maps
projet codes or interwiki prefixes to URLs.

What would be needed is that every project generate their own basic statistic dumps into a common statistics
database which could be reached from all projects. But they would need to refresh those dumps regularly to
this extra database. Having them updating instantly a centralization database would have a serious
performance impact on all wiki projects due to the extra synchronization needed. But may be it could be a
background thread that runs periodically to update the external database.

Such background database update task could be used to export other things, like the list of blocked vandals
or spammers, and to automatically import from every project.

But is it needed in the MediaWiki software itself? Can't that be performed by a bot? How many projects such
bot will need to update? and with which frequency (don't forget that each bot update will add to the history
of each project, so it could generate rapidly huge volums of transactions if it runs on all current 229
projects)?

So may be an extra connection to a central statistics database, running as a thread of the MediaWiki server
will be better, avoiding too many update transactions into lots of projects, and unnecessary logs into an
article for the imported data.

artslave wrote:

A bot is probably actually the best solution for this (there weren't many around
when I first proposed this). The stats don't need to be kept in a database,
really -- any wiki page would do.

On poking around, it looks like User:Mutante was working on a script to do this
as of March -- see http://meta.wikimedia.org/wiki/User:Mutante/Wikistats and
http://wikiindex.com/User:Mutante for details.

  • Bug 7911 has been marked as a duplicate of this bug. ***

chinchi29 wrote:

This function exists in template:NUMBEROF (http://en.wikipedia.org/wiki/Template:NUMBEROF) which is updated trough bot.

[mass-moving wikistats reports from Wikimedia→Statistics to Analytics→Wikistats to have stats issues under one Bugzilla product (see bug 42088) - sorry for the bugspam!]

epriestley closed this task as Resolved by committing Unknown Object (Diffusion Commit).Mar 4 2015, 8:22 AM
epriestley added a commit: Unknown Object (Diffusion Commit).
Nemo_bis renamed this task from Language-specific article count variables to Magic word to output article count of remote wikis.Dec 5 2015, 3:15 PM
Nemo_bis set Security to None.
Nemo_bis subscribed.

I believe this is a WORKSFORME: Mxn created Module:Project_portal, which can be used to output the article count of any Wikimedia wiki (via the on-wiki lists which are updated by bots).

Nemo_bis assigned this task to mxn.