Krinkle / mw-tool-usage

Moved to https://gerrit.wikimedia.org/g/labs/tools/usage
https://usage.toolforge.org/
MIT License
7 stars 3 forks source link

Include gadget usage #6

Closed Krinkle closed 1 year ago

Krinkle commented 8 years ago

This is currently being worked on at https://phabricator.wikimedia.org/T115152.

Once finished, we can query this through the querypage API. Alternatively, https://phabricator.wikimedia.org/T65782 may allow for a way to fetch it from the database in a more performant way.

Pathoschild commented 8 years ago

It's live! The DB tables aren't visible from Tool Labs, but the API is there:

<Krenair> I don't think the DB cache table is public, but the API should work <legoktm> Pathoschild: https://en.wikipedia.org/w/api.php?action=query&list=querypage&qppage=GadgetUsage it's a bit weird but close enough? <Krenair> yes, querycache exists in prod but is not visible in labs

Krinkle commented 8 years ago

So there's two ways we could do this:

  1. For incoming links from a MediaWiki:Gadget-*.js page, interpret the * portion as possible gadget name and also include its usage via the GadgeUsage API.
    • Benefit (up side): Works by itself (implicitly).
    • Drawback (down side): A gadget may be composed of multiple pages in which case some of the pages will not match any gadget id. Even a single-page-gadget may have its script on a page that doesn't match the gadget id.
  2. Expand the file group syntax in this repository to also allow specifying which gadget name(s) should be be considered.
    • Benefit: Is more declarative, will support any gadget id regardless of scrip page name, encourages gadgets to have the same ID on all wikis.
    • Drawback: Requires more work to list them all here in the configuration file.

/cc @he7d3r

Krinkle commented 1 year ago

Moved to https://phabricator.wikimedia.org/T334804.