ProofreadPage: allow access to proofread page index stats from templates/modules
Closed, ResolvedPublic

Description

While considering the use case for something like frWS's https://fr.wikisource.org/wiki/Utilisateur:BookwormBot for tracking proofread status of a set of indexes, it occurs that it would be useful if this kind of data could be generated on the fly using some kind of tag in the Wikicode, which would drastically reduce the number of moving parts.

For example,

<indexstatus index="Foo.djvu" count="0,4"/> returns the total number of pages at status 0 and 4 in the given index.

However, I am not sure that such a thing wouldn't be too much server overhead, as opposed to an "asynchronous" task that updates a data table? @Tpt: any concept of if this would be impractical on the server end?

Event Timeline

Could we store these as tags that are updated whenever a Page is saved?

@Languageseeker I think that's technically possible with a change to the DB schema, but the book-keeping could be fairly tricksy (unless you just recomputed the entire book on each page save, which might be OK, I have no idea of the speed). I'm not sure if there's a facility for some sort of "cache" either.

But probably worth making sure the dumb and naive way (compute every time) is as impractical as I worry first before adding complexity.

Change 698770 had a related patch set uploaded (by Inductiveload; author: Inductiveload):

[mediawiki/extensions/ProofreadPage@master] Add IndexProgress tag

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

Change 699086 had a related patch set uploaded (by Inductiveload; author: Inductiveload):

[mediawiki/extensions/ProofreadPage@master] Add ProofreadPage Lua library

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

Change 698770 abandoned by Inductiveload:

[mediawiki/extensions/ProofreadPage@master] Add IndexProgress tag

Reason:

Re-implemented as a Lua lib in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ProofreadPage/ /699086

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

Inductiveload renamed this task from ProofreadPage: Code Tags for proofread progress to ProofreadPage: allow access to proofread page index stats from templates/modules.Jun 10 2021, 1:12 PM

Change 699208 had a related patch set uploaded (by Inductiveload; author: Inductiveload):

[integration/config@master] zuul: Add Scributo as a dependency for ProofreadPage

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

Change 699208 merged by jenkins-bot:

[integration/config@master] zuul: Add Scributo as a dependency for ProofreadPage

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

Mentioned in SAL (#wikimedia-releng) [2021-06-10T21:05:04Z] <James_F> Zuul: [mediawiki/extensions/ProofreadPage] Add Scribunto as a dependency T281195

Change 699281 had a related patch set uploaded (by Jforrester; author: Jforrester):

[integration/config@master] Zuul: [mediawiki/extensions/ProofreadPage] Add Scribunto as phan dep too

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

Change 699281 merged by jenkins-bot:

[integration/config@master] Zuul: [mediawiki/extensions/ProofreadPage] Add Scribunto as phan dep too

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

Mentioned in SAL (#wikimedia-releng) [2021-06-10T21:12:01Z] <James_F> Zuul: [mediawiki/extensions/ProofreadPage] Add Scribunto as phan dep too T281195

Just an example of what this will allow:

2021-06-15_192344_1284x270_screenshot.png (270×1 px, 20 KB)

Change 699086 merged by jenkins-bot:

[mediawiki/extensions/ProofreadPage@master] Add ProofreadPage Lua library

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

Inductiveload claimed this task.

This is now working at enWS and allows to drive "live" index progress stats:

2021-09-17_085752_649x153_screenshot.png (153×649 px, 36 KB)