Page MenuHomePhabricator

Script for searching file duplicates
Open, LowPublicFeature

Description

Hi, guys.

It is possible to get a list of duplicate files of any wiki by going from them with an API request:
https://ru.wikipedia.org/w/api.php?action=query&generator=allimages&prop=duplicatefiles&gailimit=500&format=xml

I have searched en.wiki, commons, other chapters, there are multiple files to be worked with and no other way to find them. People in commons have some sort of JS userscripts but having a bot would be more useful.

Is it possible to make a basic script that would just post the report of found duplicates somewhere in wiki? The next version would be an opportunity of tagging them somehow.

I am looking through pagegenerator.py but not sure I can do it completely myself.

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald Transcript
Xqt triaged this task as Low priority.Jan 6 2021, 6:06 AM
Xqt changed the subtype of this task from "Task" to "Feature Request".
Xqt subscribed.

I think listpages.py is a basic script for that. It uses all pagegenerators options to find pages, categories or files and prints or saved it in a defined formatted way. It also is able to tag it to a wikipage I guess. But I am unsure about the duplicate property. Maybe this should become part of pg options if necessary.