Page MenuHomePhabricator

[script request] Please create a pywikibot script to remove broken file links from pages
Closed, ResolvedPublicFeature

Description

In order to remove broken file links (i.e. the redlink that is left on a page when a file is deleted), I'd like to propose that a specific Pywikibot script be created. While scripts may exist out there, AFAICS there's no standard pywikibot script for this.

On Wikimedia projects where local uploads are allowed (and therefore there's no CommonsDelinker taking care of that task) this has to be done by hand by checking the tracking category, which is very time consuming.

The script should support the Pywikibot global options to e.g., restrict the run to specific pages or namespaces (for example, broken file links are created on purpose to track the usage of certain scripts and gadgets).

Thank you.

Update: See also T146572: image.py: allow the script to work on system category 'Category:Pages with broken file links' by me some years ago, asking for a similar functionality for image.py.

Event Timeline

Xqt triaged this task as Medium priority.Jan 20 2022, 6:39 AM

Change 776176 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [IMPR] Port CommonsDelinker to core

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

Change 777383 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/i18n@master] [i18n] Add delinker bot summary to the i18n system

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

Change 777383 merged by jenkins-bot:

[pywikibot/i18n@master] [i18n] Add delinker bot summary to the i18n system

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

Change 776176 merged by jenkins-bot:

[pywikibot/core@master] [IMPR] Port CommonsDelinker to core

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