Jump to content

Manuel:Pywikibot/solve disambiguation.py

From mediawiki.org
This page is a translated version of the page Manual:Pywikibot/solve disambiguation.py and the translation is 31% complete.
Vous aider à choisir la bonne page parmi plusieurs homonymes.

solve_disambiguation.py is a Python bot script to help a human solve links to disambiguation pages by presenting a set of options.

Tapez la page d’homonymie sur la ligne de commande. Le programme prend la page et crée un menu de tous les liens sortants trouvés sur la page, avec un numéro unique adjacent à chaque lien. Il parcourt ensuite automatiquement toutes les pages qui font référence à la page d'homonymie, et affiche 30 caractères de contexte de chaque côté de la référence pour vous aider à choisir entre les alternatives. Il vous demandera de taper le numéro du remplacement approprié et d’effectuer la modification.

It is possible to choose to replace only the link (just type the number) or replace both link and link-text (type r followed by the number).

Multiple references in one page will be scanned in order, but typing n (next) on any one of them will leave the complete page unchanged. To leave only some reference unchanged, use the s (skip) option.

Options en ligne de commande (en plus des options générales pour tous les bots) :

-pos:XXXX adds XXXX as an alternative disambiguation
-just Only use the alternatives given on the command line, do not read the page for other possibilities.
-primary "Primary topic" disambiguation (Begriffsklärung nach Modell 2). That's titles where one topic is much more important, the disambiguation page is saved somewhere else, and the important topic gets the nice name. All links found on page XXXX (disambiguation) will be listed as options for the user, but the bot will still work on links to XXXX.
-primary:XY Like the above, but use XY as the only alternative, instead of searching for alternatives in [[Keyword (disambiguation)]]. Note: this is the same as -primary -just -pos:XY.
-file:XYZ Reads a list of pages, which can for example be gotten through extract_names.py. XYZ is the name of the file from which the list is taken. If XYZ is not given, the user is asked for a filename.

Page titles should be listed one per line, with [[brackets]].

The -pos parameter won't work if -file is used.

-always:XY Instead of asking the user what to do, always perform the same action. For example, XY can be "r0", "u" or "2". Be careful with this option, and check the changes made by the bot. Note that some choices for XY don't make sense and will result in a loop, e.g., "l" or "m".
-main Only check pages in the main namespace, not in the talk, wikipedia, user, etc. namespaces.
-first Uses only the first link of every line on the disambiguation page that begins with an asterisk. Useful if the page is full of irrelevant links that are not subject to disambiguation. You won't get all af them as options, just the first on each line. For a moderated example see w:Szerdahely, and for a really exotic one hu:Brabant (egyértelműsítő lap)
-start:XY Goes through all disambiguation pages in the category on your wiki that is defined (to the bot) as the category containing disambiguation pages, starting at XY. If only '-start' or '-start:' is given, it starts at the beginning.

Pour compléter un déplacement d’une page, on peut utiliser :

   $ python pwb.py solve_disambiguation -just -pos:New_Name Old_Name

Voir aussi

  1. Manual:Pywikibot/user-config.py#Configuration - about sorting links