Page MenuHomePhabricator

autonomous deletions for redirect.py
Closed, InvalidPublic

Description

Is it possible to add argument for redirect.py, so that running "redirect.py br" wouldn't ask for confirmation of deletions?
Some "autonomous" mode with automatical deletion of all broken redirects: "-always" mode isn't for this option, no "-autonomous" is shown in -help output.


version output:

tools.rubinbot@tools-login:~/.pywikibot$ python scripts/version.py
Pywikibot: [https] r-pywikibot-core.git (5cce877, g3, 2014/12/15, 08:16:04, OUTDATED)
Release version: 2.0b3
httplib2 version: 0.7.2

cacerts: /etc/ssl/certs/ca-certificates.crt
  certificate test: ok

Python: 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3]

unicode test: ok

PYWIKIBOT2_DIR: Not set
PYWIKIBOT2_DIR_PWB: Not set
PYWIKIBOT2_NO_USER_CONFIG: Not set
Config base dir: /data/project/rubinbot/.pywikibot
Usernames for family "wikipedia":

ru: Rubinbot II (also sysop)

Event Timeline

Rubin16 created this task.Dec 16 2014, 4:01 PM
Rubin16 raised the priority of this task from to Needs Triage.
Rubin16 updated the task description. (Show Details)
Rubin16 changed Security from none to None.
Rubin16 added a subscriber: Rubin16.
Xqt added a subscriber: Xqt.Dec 16 2014, 4:07 PM

-delete option does it

Not for me.

I run "python scripts/redirect.py br -delete", the bot works on the special page and asks something like "Do you want to delete the page? [Y]es, [N]o, [A]ll".

I am asking for option that would always delete without prior asking.

Xqt closed this task as Invalid.Dec 16 2014, 4:17 PM
Xqt claimed this task.
Xqt reopened this task as Open.Dec 16 2014, 4:23 PM

-delete is to allow deletion of the broken redirect, -always to prohibit confirmation. You have to use both options for core:
pwb.py redirect broken -delete -always

for compat there is no -delete option and the sd template will be tagged or the page will be deleted for sysop bots. But you must also use -always option:

redirect.py broken -always

Xqt added a comment.Dec 16 2014, 4:25 PM

The third way is to choose [A]ll for all pages which is equal to -always after first choice.

Thanks!

I thought that "always" relates to edits, not deletions, as "-help" says about replacements, not deletions:

-always Don't prompt you for each replacement.

You can close the ticket :)

Xqt closed this task as Invalid.Dec 16 2014, 5:09 PM