Page MenuHomePhabricator

Allow configuration of the "nobots" template name (future request)
Closed, DeclinedPublic

Description

There is a nobots template now and I would really appreciate to be able to change the name of the template that tells pywikibot not to edit the page.

To clarify -I would like to prevent pywikibot from editing a whole bunch of pages with already substituted template on them (talking hundreds of articles), so I need to configure him to ignore the already given template that is not named Nobots but otherwise.

Thank you very much for helping me out here.

Related Objects

Event Timeline

Wesalius raised the priority of this task from to Needs Triage.
Wesalius updated the task description. (Show Details)
Wesalius added a project: Pywikibot.
Wesalius subscribed.

I'm a bit confused what you actually want. We already check for both “Bots” and “Nobots” template.

Now do you want to iterate only over pages which aren't blocked (aka don't use a “nobots” template)? In that case an inverted -grep command could be helpful, but we only allow a filter when pages are matched and not when they aren't matched.

I would like to be able to tell PWB what is the name of the template he should check for on pages that I want to prevent him from editing, something like a parameter

-donteditpageswithtemplate:"my_own_template_name"

or if I could tell PWB in my user_config what is the name of a template I want him to check for at pages that are not to be edited...

There are two different components:

  • Preventing it from saving a page
  • Actually skipping them in the pagegenerator

Changing the first will still allow you to iterate over them (for example in python pwb.py listpages) while the latter will not show them in python pwb.py listpages (if you use that pagegenerator) but if you don't use that generator it'll still work on these pages and save them. The latter would be something like the inverted -grep option. The former has the issue that every wiki seems to implement their own style. So sometimes a template means the inverted of another template, sometimes they mean the same and sometimes either of them can have parameters which further narrow down to which bots it applies.

At the moment the nobots template by default blocks the access for all or only to the bots listed in the first parameter while the bots template by default blocks no access and deny/denyscript can limit that while allow/allowscript can allow something specifically. My point is that we probably need a consistent way do describe those things so that they can be modified by site configuration (T104821) or inside the family.

So there could be also a third component, to add a shortcut for a pagegenerator which skips the pages according to the nobots/bots rule present (basically if page.botMayEdit must be True to be yielded by the generator).

Hi, I just figured an easy workaround to this, so you guys can focus more of your programming power to other bugs. While running replaces I can use

-excepttext:"{{Template_name"

and should be achieving exactly what I need, right?

Xqt claimed this task.
Xqt subscribed.

solved per already given filters