Page MenuHomePhabricator

interwiki.py delete links to ignored langs, instead ignore
Open, Needs TriagePublic

Description

Command py pwb.py interwiki -start -confirm -neverlink:de attempt delete all [[de: links

I expect that the -neverlink key will instruct the bot not to check the relevance of the link to the specified language pages, but to leave it as is, assuming that it is correct, and sort it in a single list if necessary. By sort it in a single list, I mean that the bot will not separate it into a separate list of "outdated links."

Event Timeline

Change #1205493 had a related patch set uploaded (by Dumbledore; author: Dumbledore):

[pywikibot/core@master] Fix interwiki.py delete links to ignored langs, instead ignore

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

Isn't -ignore the right option for the wanted behaviour?

@Xqt No, this key is for specifying specific pages. And in general, to remove all interwiki links to a specific language used the replace.py.

According to T57279, the current behaviour seems intentional; however, an option should be provided to keep the link rather than remove it.

Thanks for pointing that out! I've updated the patch to fix this. The bot now skips interwiki links to neverlink languages during processing, so they're preserved instead of being deleted. The fix is in the check_page() method - it simply continues to the next link when it encounters a neverlink language, preventing it from being processed or removed.

Could you take a look at the updated patch?

Thanks for pointing that out! I've updated the patch to fix this. The bot now skips interwiki links to neverlink languages during processing, so they're preserved instead of being deleted. The fix is in the check_page() method - it simply continues to the next link when it encounters a neverlink language, preventing it from being processed or removed.

Could you take a look at the updated patch?

@Dumbledore, was the question for me?