Hi! I was a bit incorrect when I said that there are 4000+ files, there are 4000+ articles with non-existent files.
I also can generate list of files to unlink through one of the special pages, but don't know what way will be easier and more efficient: working on the list of articles and removing all red links to files or generating list of files and unlinking them. Anyway, my request will end up in bugzilla as I am not able to amend such script myself :) rubin 10.05.2014 0:10 пользователь "Merlijn van Deen" <[email protected]> написал: > Hi Rubin, > > On 9 May 2014 21:09, rubin.happy <[email protected]> wrote: > >> So, are there any ready methods/scripts to do this task? Ru.wiki has >> about 4000+ files with red links to files and such a bot would be really >> helpful... >> > Do you have a list of the files that should be unlinked, or should all > non-existing images be unlinked? The first case is easy, the second one is > harder, but can still be done easily as long as the Toolserver is still > online. > > Basically, the trick would be to combine the existing Delinker class with > something that feeds it a list of files to remove; the basic syntax for > something like that would be > > Delinkers = threadpool.ThreadPool(Delinker, > self.config['delinker_instances'], self) > > for file in files_to_remove: > Delinkes.append(file, ...some other parameters..., replacement=None) > > > as for the other parameters, you'd have to check the Delinker code -- I > don't think there are docs, unfortunately. > > > > Merlijn > > _______________________________________________ > Pywikipedia-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l > >
_______________________________________________ Pywikipedia-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
