jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/509631 )
Change subject: [tests] Skip scripts which are in _allowed_failure list
......................................................................
[tests] Skip scripts which are in _allowed_failure list
Bug: T223030
Change-Id: I90724c76f54fa4812bd94291cfd92116cd4e589e
---
M tests/script_tests.py
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
Dvorapa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/script_tests.py b/tests/script_tests.py
index e265965..593c73c 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -15,7 +15,7 @@
from tests import join_root_path, unittest_print
from tests.aspects import (unittest, DefaultSiteTestCase, MetaTestCaseClass,
PwbTestCase)
-from tests.utils import allowed_failure, execute_pwb, add_metaclass
+from tests.utils import execute_pwb, add_metaclass
scripts_path = join_root_path('scripts')
@@ -341,7 +341,9 @@
if script_name in dct['_expected_failures']:
dct[test_name] = unittest.expectedFailure(dct[test_name])
elif script_name in dct['_allowed_failures']:
- dct[test_name] = allowed_failure(dct[test_name])
+ dct[test_name] = unittest.skip(
+ '{} is in _allowed_failures list'
+ .format(script_name))(dct[test_name])
# Disable test by default in nosetests
if script_name in unrunnable_script_set:
--
To view, visit https://gerrit.wikimedia.org/r/509631
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I90724c76f54fa4812bd94291cfd92116cd4e589e
Gerrit-Change-Number: 509631
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/509584 )
Change subject: [doc] Remove anchor duplicate to heading
......................................................................
[doc] Remove anchor duplicate to heading
Headings have their anchor generated automatically and in lowercase, therefore
the anchor on that place is redundant.
Bug: T187009
Change-Id: Idefba18818fd8416cc24ddbf73dd40dbc39d053e
---
M docs/installation.rst
1 file changed, 0 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/installation.rst b/docs/installation.rst
index 9e24268..c2f98fb 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -1,7 +1,5 @@
Installation
------------
-.. _installation:
-
.. note::
Please see the documentation at `Manual:Pywikibot/Installation <https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation>`_
--
To view, visit https://gerrit.wikimedia.org/r/509584
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idefba18818fd8416cc24ddbf73dd40dbc39d053e
Gerrit-Change-Number: 509584
Gerrit-PatchSet: 3
Gerrit-Owner: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/509432 )
Change subject: [doc] Fix errors and warnings in script_wui.py documentation
......................................................................
[doc] Fix errors and warnings in script_wui.py documentation
- declare dependencies optional to make doc generation work in deprecated
script
- fix markup errors
- remove unused diff_checker dependency
Bug: T187009
Change-Id: Iaad2f5a1dbc94d8b9c3d68a04825d82a3ec551cf
---
M docs/requirements-py3.txt
M scripts/archive/script_wui.py
2 files changed, 25 insertions(+), 16 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/requirements-py3.txt b/docs/requirements-py3.txt
index d7647fc..1265fa8 100644
--- a/docs/requirements-py3.txt
+++ b/docs/requirements-py3.txt
@@ -3,5 +3,4 @@
# requirements.txt and pywikibot[security] are also needed
sphinx >= 1.8
-sphinx-epytext>=0.0.4
-unidiff
+sphinx-epytext>=0.0.4
\ No newline at end of file
diff --git a/scripts/archive/script_wui.py b/scripts/archive/script_wui.py
index 555b257..25fa9f1 100755
--- a/scripts/archive/script_wui.py
+++ b/scripts/archive/script_wui.py
@@ -15,21 +15,20 @@
The predefined wiki page for crontab sets the shell page contents to
a specified revision in the specified interval.
-Usage
-~~~~~
+USAGE
It needs Lua or LuaJIT installed and also external PyPI packages
crontab, irc and lupa in order to run properly. Some code might
get compiled on-the-fly, so a GNU compiler along with library
header files is needed too.
-You will need to create the following pages on your wiki:
+You will need to create the following pages on your wiki.
-:User:{username}/script_wui-crontab.css:
+- User:{username}/script_wui-crontab.css
This page specifies the commands to execute, one command per line.
See [[de:Benutzer:DrTrigon/DrTrigonBot/script_wui-shell.css]]
for example.
-:User:{username}/script_wui-shell.css:
+- User:{username}/script_wui-shell.css
This page specifies the schedule to execute specific page revision.
The following format can be used: revision, timestamp
See [[de:Benutzer:DrTrigon/DrTrigonBot/script_wui-crontab.css]]
@@ -71,13 +70,19 @@
from io import StringIO
-from lupa import LuaRuntime
-lua = LuaRuntime(unpack_returned_tuples=True)
+try:
+ from lupa import LuaRuntime
+ lua = LuaRuntime(unpack_returned_tuples=True)
+except ImportError:
+ lua = None
# The 'crontab' PyPI package versions 0.20 and 0.20.1 installs
# a package called 'tests' which conflicts with our test suite.
# The patch to fix this has been released in version 0.20.2.
-import crontab
+try:
+ import crontab
+except ImportError:
+ crontab = None
import pywikibot
# pywikibot.botirc depends on 'irc' PyPI package
@@ -126,12 +131,13 @@
# init environment with minimal changes (try to do as less as possible)
# - Lua -
- pywikibot.output('** Redirecting Lua print in order to catch it')
- lua.execute('__print = print')
- lua.execute('print = python.eval("pywikibot.output")')
- # It may be useful in debugging to install the 'print' builtin
- # as the 'print' function in lua. To do this:
- # lua.execute('print = python.builtins.print')
+ if lua:
+ pywikibot.output('** Redirecting Lua print in order to catch it')
+ lua.execute('__print = print')
+ lua.execute('print = python.eval("pywikibot.output")')
+ # It may be useful in debugging to install the 'print' builtin
+ # as the 'print' function in lua. To do this:
+ # lua.execute('print = python.builtins.print')
# init constants
templ = pywikibot.Page(self.site, bot_config['ConfCSSshell'])
@@ -197,6 +203,10 @@
# [min] [hour] [day of month] [month] [day of week]
# (date supported only, thus [min] and [hour] dropped)
+ if not crontab:
+ pywikibot.error(
+ '"crontab" library is needed to run the script properly.')
+ return None
entry = crontab.CronTab(timestmp)
# find the delay from current minute
# (does not return 0.0 - but next)
--
To view, visit https://gerrit.wikimedia.org/r/509432
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaad2f5a1dbc94d8b9c3d68a04825d82a3ec551cf
Gerrit-Change-Number: 509432
Gerrit-PatchSet: 9
Gerrit-Owner: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/481338 )
Change subject: [bugfix] Drop botirc.py library part
......................................................................
[bugfix] Drop botirc.py library part
- Print a deprecation warning if IRCBot is used within botirc.py
- remove irc from requirements.txt and setup.py because it is
used by archived script script_wui.py and deprecated library part
botirc.py only
Bug: T212627
Bug: T212632
Change-Id: I20e97339afe0ad45722d7128f2a356d1390cfac7
---
M HISTORY.rst
M pywikibot/CONTENT.rst
M pywikibot/botirc.py
M requirements.txt
M setup.py
5 files changed, 20 insertions(+), 15 deletions(-)
Approvals:
Dvorapa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/HISTORY.rst b/HISTORY.rst
index efc98c2..44bd9a5 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -4,6 +4,7 @@
Current release
---------------
+* botirc.IRCBot has been dropped
* Bugfixes and improvements
* Localisation updates
diff --git a/pywikibot/CONTENT.rst b/pywikibot/CONTENT.rst
index cd486e8..caced5f 100644
--- a/pywikibot/CONTENT.rst
+++ b/pywikibot/CONTENT.rst
@@ -16,7 +16,8 @@
+---------------------------+-------------------------------------------------------+
| bot_choice.py | Classes for input_choice |
+---------------------------+-------------------------------------------------------+
- | botirc.py | User-interface related functions for building irc bot |
+ | botirc.py | Deprecated user-interface related functions for |
+ | | building irc bot |
+---------------------------+-------------------------------------------------------+
| config2.py | Module to define and load pywikibot configuration |
+---------------------------+-------------------------------------------------------+
diff --git a/pywikibot/botirc.py b/pywikibot/botirc.py
index 4ada623..4db2ef1 100644
--- a/pywikibot/botirc.py
+++ b/pywikibot/botirc.py
@@ -1,9 +1,12 @@
# -*- coding: utf-8 -*-
"""
-User-interface related functions for building bots.
+WARNING: THIS MODULE EXISTS SOLELY TO PROVIDE BACKWARDS-COMPATIBILITY.
-Note: the script requires the Python IRC library
-http://python-irclib.sourceforge.net/
+IT MAY BE REMOVED SOON.
+
+Deprecated user-interface related functions for building bots.
+
+@note: the script requires the irc library
"""
#
# (C) Balasyum, 2008
@@ -13,14 +16,10 @@
#
from __future__ import absolute_import, division, unicode_literals
-# Note: the intention is to develop this module (at some point) into a Bot
-# class definition that can be subclassed to create new, functional bot
-# scripts, instead of writing each one from scratch.
-
-
import re
import pywikibot
+from pywikibot.tools import ModuleDeprecationWrapper
try:
from irc.bot import SingleServerIRCBot
@@ -37,6 +36,7 @@
_logger = 'botirc'
+__all__ = ('IRCBot',)
class IRCBot(pywikibot.Bot, SingleServerIRCBot):
@@ -50,9 +50,8 @@
"""
# Bot configuration.
- # Only the keys of the dict can be passed as init options
+ # Only the keys of the dict can be passed as keyword arguments
# The values are the default values
- # Extend this in subclasses!
availableOptions = {} # noqa: N815
def __init__(self, site, channel, nickname, server, port=6667, **kwargs):
@@ -127,3 +126,11 @@
def on_quit(self, e, cmd):
"""Ignore quit request."""
pass
+
+
+wrapper = ModuleDeprecationWrapper(__name__)
+wrapper._add_deprecated_attr(
+ 'IRCBot',
+ replacement_name=('irc.bot.SingleServerIRCBot from irc library '
+ 'or EventStreams'),
+ since='20190509')
diff --git a/requirements.txt b/requirements.txt
index ec693c7..a07e83a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -52,9 +52,6 @@
# scripts/flickrripper.py
flickrapi
-# incomplete core component botirc
-irc
-
# textlib.py and patrol.py
mwparserfromhell>=0.3.3
diff --git a/setup.py b/setup.py
index e218e90..cdc5bb9 100644
--- a/setup.py
+++ b/setup.py
@@ -51,7 +51,6 @@
'isbn': ['python-stdnum'],
'Graphviz': ['pydot>=1.2'],
'Google': ['google>=1.7'],
- 'IRC': ['irc'],
'mwparserfromhell': ['mwparserfromhell>=0.3.3'],
'Tkinter': [pillow],
'security': ['requests[security]', 'pycparser!=2.14'],
--
To view, visit https://gerrit.wikimedia.org/r/481338
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I20e97339afe0ad45722d7128f2a356d1390cfac7
Gerrit-Change-Number: 481338
Gerrit-PatchSet: 14
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/509534 )
Change subject: [doc] Minor appearance changes to make doc better readable
......................................................................
[doc] Minor appearance changes to make doc better readable
Change-Id: I5e6f39890afcf195db3a77547f1f91a2754d8495
---
M scripts/harvest_template.py
M scripts/maintenance/cache.py
M scripts/patrol.py
M scripts/welcome.py
4 files changed, 26 insertions(+), 24 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index a0f8cbe..94404eb 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -42,49 +42,50 @@
-multi If set, try to match multiple values from parameter.
-Examples:
+Examples
+--------
+
+This will try to import existing images from "image" parameter of "Infobox
+person" on English Wikipedia as Wikidata property "P18" (image):
python pwb.py harvest_template -lang:en -family:wikipedia -namespace:0 \
-template:"Infobox person" image P18
- will try to import existing images from "image" parameter of "Infobox
- person" on English Wikipedia as Wikidata property "P18" (image).
+This will behave the same as the previous example and also try to import
+[[links]] from "birth_place" parameter of the same template as Wikidata
+property "P19" (place of birth):
python pwb.py harvest_template -lang:en -family:wikipedia -namespace:0 \
-template:"Infobox person" image P18 birth_place P19
- will behave the same as the previous example and also try to import
- [[links]] from "birth_place" parameter of the same template as Wikidata
- property "P19" (place of birth).
+This will import both "birth_place" and "death_place" params with -islink
+modifier, ie. the bot will try to import values, even if it doesn't find
+a [[link]]:
python pwb.py harvest_template -lang:en -family:wikipedia -namespace:0 \
-template:"Infobox person" -islink birth_place P19 death_place P20
- will import both "birth_place" and "death_place" params with -islink
- modifier, ie. the bot will try to import values, even if it doesn't find
- a [[link]].
+This will do the same but only "birth_place" can be imported without a link:
python pwb.py harvest_template -lang:en -family:wikipedia -namespace:0 \
-template:"Infobox person" birth_place P19 -islink death_place P20
- will do the same but only "birth_place" can be imported without a link.
+This will import an occupation from "occupation" parameter of "Infobox
+person" on English Wikipedia as Wikidata property "P106" (occupation). The
+page won't be skipped if the item already has that property but there is
+not the new value:
python pwb.py harvest_template -lang:en -family:wikipedia -namespace:0 \
-template:"Infobox person" occupation P106 -exists:p
- will import an occupation from "occupation" parameter of "Infobox
- person" on English Wikipedia as Wikidata property "P106" (occupation). The
- page won't be skipped if the item already has that property but there is
- not the new value.
+This will import band members from the "current_members" parameter of "Infobox
+musical artist" on English Wikipedia as Wikidata property "P527" (has
+part). This will only extract multiple band members if each is linked, and
+will not add duplicate claims for the same member:
python pwb.py harvest_template -lang:en -family:wikipedia -namespace:0 \
-template:"Infobox musical artist" current_members P527 -exists:p \
-multi
-
- will import band members from the "current_members" parameter of "Infobox
- musical artist" on English Wikipedia as Wikidata property "P527" (has
- part). This will only extract multiple band members if each is linked, and
- will not add duplicate claims for the same member.
"""
#
# (C) Multichill, Amir, 2013
diff --git a/scripts/maintenance/cache.py b/scripts/maintenance/cache.py
index 8197650..c037d06 100755
--- a/scripts/maintenance/cache.py
+++ b/scripts/maintenance/cache.py
@@ -23,7 +23,8 @@
-o Output command which is output when the filter evaluated to
True. If it returns None it won't output anything.
-Example commands:
+Examples
+--------
Print the filename of any entry with 'wikidata' in the key:
@@ -34,7 +35,7 @@
-c entry.site.code == "ar"
-o uniquedesc(entry)
- Or the state of the login
+ Or the state of the login:
-c entry.site._loginstatus == LoginStatus.NOT_ATTEMPTED
-o uniquedesc(entry)
@@ -55,6 +56,7 @@
recent(entry)
There are helper functions which can be part of a command:
+
older_than(entry, interval)
newer_than(entry, interval)
diff --git a/scripts/patrol.py b/scripts/patrol.py
index b15c637..a07ed54 100755
--- a/scripts/patrol.py
+++ b/scripts/patrol.py
@@ -6,8 +6,7 @@
This bot obtains a list of recent changes and newpages and marks the
edits as patrolled based on a whitelist.
-Whitelist format
-~~~~~~~~~~~~~~~~
+WHITELIST FORMAT
The whitelist is formatted as a number of list entries. Any links outside of
lists are ignored and can be used for documentation. In a list the first link
diff --git a/scripts/welcome.py b/scripts/welcome.py
index e1ed709..1ae033a 100755
--- a/scripts/welcome.py
+++ b/scripts/welcome.py
@@ -134,7 +134,7 @@
*<SPACE>SIGNATURE
<NEW LINE>
-Example:
+Example of signatures:
<pre>
* [[User:Filnik|Filnik]]
--
To view, visit https://gerrit.wikimedia.org/r/509534
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5e6f39890afcf195db3a77547f1f91a2754d8495
Gerrit-Change-Number: 509534
Gerrit-PatchSet: 1
Gerrit-Owner: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki(a)aol.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/509479 )
Change subject: [doc] Improve docs and fix some doc warnings
......................................................................
[doc] Improve docs and fix some doc warnings
Bug: T187009
Change-Id: I1d98896006305b44d87448fa8caa13ca5b7912e4
---
M pywikibot/comms/eventstreams.py
M pywikibot/page.py
M scripts/add_text.py
M scripts/basic.py
M scripts/blockpageschecker.py
M scripts/capitalize_redirects.py
M scripts/catall.py
M scripts/category.py
M scripts/category_redirect.py
M scripts/commons_link.py
M scripts/commonscat.py
M scripts/cosmetic_changes.py
M scripts/delete.py
M scripts/editarticle.py
M scripts/fixing_redirects.py
M scripts/flickrripper.py
M scripts/harvest_template.py
M scripts/imagecopy.py
M scripts/imagecopy_self.py
M scripts/imageharvest.py
M scripts/imagetransfer.py
M scripts/interwiki.py
M scripts/login.py
M scripts/lonelypages.py
M scripts/maintenance/cache.py
M scripts/makecat.py
M scripts/nowcommons.py
M scripts/patrol.py
M scripts/piper.py
M scripts/protect.py
M scripts/redirect.py
M scripts/reflinks.py
M scripts/revertbot.py
M scripts/selflink.py
M scripts/spamremove.py
M scripts/states_redirect.py
M scripts/surnames_redirects.py
M scripts/table2wiki.py
M scripts/template.py
M scripts/templatecount.py
M scripts/touch.py
M scripts/transferbot.py
M scripts/unlink.py
M scripts/upload.py
M scripts/weblinkchecker.py
M scripts/welcome.py
M scripts/wikisourcetext.py
47 files changed, 228 insertions(+), 166 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/comms/eventstreams.py b/pywikibot/comms/eventstreams.py
index 690b4d7..63f5a5b 100644
--- a/pywikibot/comms/eventstreams.py
+++ b/pywikibot/comms/eventstreams.py
@@ -4,7 +4,8 @@
This file is part of the Pywikibot framework.
-This module requires sseclient to be installed:
+This module requires sseclient to be installed::
+
pip install sseclient
"""
#
diff --git a/pywikibot/page.py b/pywikibot/page.py
index c39a3e6..e717e67 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4794,8 +4794,11 @@
A Wikibase entity in the property namespace.
Should be created as::
+
PropertyPage(DataSite, 'P21')
- or
+
+ or::
+
PropertyPage(DataSite, datatype='url')
"""
diff --git a/scripts/add_text.py b/scripts/add_text.py
index c489f5d..386dd44 100755
--- a/scripts/add_text.py
+++ b/scripts/add_text.py
@@ -37,18 +37,17 @@
Example
-------
-1.
-# This is a script to add a template to the top of the pages with
-# category:catname
-# Warning! Put it in one line, otherwise it won't work correctly.
+
+1. This is a script to add a template to the top of the pages with
+category:catname
+Warning! Put it in one line, otherwise it won't work correctly:
python pwb.py add_text -cat:catname -summary:"Bot: Adding a template" \
-text:"{{Something}}" -except:"\{\{([Tt]emplate:|)[Ss]omething" -up
-2.
-# Command used on it.wikipedia to put the template in the page without any
-# category.
-# Warning! Put it in one line, otherwise it won't work correctly.
+2. Command used on it.wikipedia to put the template in the page without any
+category.
+Warning! Put it in one line, otherwise it won't work correctly:
python pwb.py add_text -except:"\{\{([Tt]emplate:|)[Cc]ategorizzare" \
-text:"{{Categorizzare}}" -excepturl:"class='catlinks'>" -uncat \
diff --git a/scripts/basic.py b/scripts/basic.py
index 73f2c2c..40b1b9d 100755
--- a/scripts/basic.py
+++ b/scripts/basic.py
@@ -10,9 +10,8 @@
Use global -simulate option for test purposes. No changes to live wiki
will be done.
-The following parameters are supported:
-¶ms;
+The following parameters are supported:
-always The bot won't ask for confirmation when putting a page
@@ -23,6 +22,11 @@
-top Place additional text on top of the page
-summary: Set the action summary message for the edit.
+
+
+The following generators and filters are supported:
+
+¶ms;
"""
#
# (C) Pywikibot team, 2006-2019
diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py
index 035fea8..93e3295 100755
--- a/scripts/blockpageschecker.py
+++ b/scripts/blockpageschecker.py
@@ -7,9 +7,6 @@
remove the warning! This script is useful if you want to remove those useless
warning left in these pages.
-Parameters
-----------
-
These command line parameters can be used to specify which pages to work on:
¶ms;
@@ -34,7 +31,7 @@
-move The bot will check if the page is blocked also for the move
option, not only for edit
---- Example of how to use the script ---
+Examples:
python pwb.py blockpageschecker -always
diff --git a/scripts/capitalize_redirects.py b/scripts/capitalize_redirects.py
index b1a42ba..76b2e61 100755
--- a/scripts/capitalize_redirects.py
+++ b/scripts/capitalize_redirects.py
@@ -8,14 +8,14 @@
Command-line arguments:
-¶ms;
-
-always Don't prompt to make changes, just do them.
-titlecase creates a titlecased redirect version of a given page
where all words of the title start with an uppercase
character and the remaining characters are lowercase.
+¶ms;
+
Example:
python pwb.py capitalize_redirects -start:B -always
diff --git a/scripts/catall.py b/scripts/catall.py
index b019976..bd2e7d1 100755
--- a/scripts/catall.py
+++ b/scripts/catall.py
@@ -3,12 +3,12 @@
"""
This script shows the categories on each page and lets you change them.
-For each page in the target wiki:
+For each page in the target wiki
-- If the page contains no categories, you can specify a list of categories to
- add to the page.
-- If the page already contains one or more categories, you can specify a new
- list of categories to replace the current list of categories of the page.
+ - If the page contains no categories, you can specify a list of categories to
+ add to the page.
+ - If the page already contains one or more categories, you can specify a new
+ list of categories to replace the current list of categories of the page.
Usage:
@@ -17,6 +17,7 @@
If no starting name is provided, the bot starts at 'A'.
Options:
+
-onlynew : Only run on pages that do not yet have a category.
"""
#
diff --git a/scripts/category.py b/scripts/category.py
index b8c9192..ceed5b0 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -7,7 +7,8 @@
python pwb.py category action [-option]
-where action can be one of these:
+where action can be one of these
+
* add - mass-add a category to a list of pages.
* remove - remove category tag from all pages in a category.
* move - move all pages in a category to another category.
@@ -15,12 +16,13 @@
* tree - show a tree of subcategories of a given category.
* listify - make a list of all of the articles that are in a category.
-and option can be one of these:
+and option can be one of these
Options for "add" action:
- * -person - Sort persons by their last name.
- * -create - If a page doesn't exist, do not skip it, create it instead.
- * -redirect - Follow redirects.
+
+ -person - Sort persons by their last name.
+ -create - If a page doesn't exist, do not skip it, create it instead.
+ -redirect - Follow redirects.
If action is "add", the following options are supported:
@@ -28,70 +30,70 @@
Options for "listify" action:
- * -append - This appends the list to the current page that is already
- existing (appending to the bottom by default).
- * -overwrite - This overwrites the current page with the list even if
- something is already there.
- * -showimages - This displays images rather than linking them in the list.
- * -talkpages - This outputs the links to talk pages of the pages to be
- listified in addition to the pages themselves.
- * -prefix:# - You may specify a list prefix like "#" for a numbered list or
- any other prefix. Default is a bullet list with prefix "*".
+ -append - This appends the list to the current page that is already
+ existing (appending to the bottom by default).
+ -overwrite - This overwrites the current page with the list even if
+ something is already there.
+ -showimages - This displays images rather than linking them in the list.
+ -talkpages - This outputs the links to talk pages of the pages to be
+ listified in addition to the pages themselves.
+ -prefix:# - You may specify a list prefix like "#" for a numbered list or
+ any other prefix. Default is a bullet list with prefix "*".
Options for "remove" action:
- * -nodelsum - This specifies not to use the custom edit summary as the
- deletion reason. Instead, it uses the default deletion reason
- for the language, which is "Category was disbanded" in
- English.
+ -nodelsum - This specifies not to use the custom edit summary as the
+ deletion reason. Instead, it uses the default deletion reason
+ for the language, which is "Category was disbanded" in
+ English.
Options for "move" action:
- * -hist - Creates a nice wikitable on the talk page of target category
- that contains detailed page history of the source category.
- * -nodelete - Don't delete the old category after move.
- * -nowb - Don't update the wikibase repository.
- * -allowsplit - If that option is not set, it only moves the talk and main
- page together.
- * -mvtogether - Only move the pages/subcategories of a category, if the
- target page (and talk page, if -allowsplit is not set)
- doesn't exist.
- * -keepsortkey - Use sortKey of the old category also for the new category.
- If not specified, sortKey is removed.
- An alternative method to keep sortKey is to use -inplace
- option.
+ -hist - Creates a nice wikitable on the talk page of target category
+ that contains detailed page history of the source category.
+ -nodelete - Don't delete the old category after move.
+ -nowb - Don't update the wikibase repository.
+ -allowsplit - If that option is not set, it only moves the talk and main
+ page together.
+ -mvtogether - Only move the pages/subcategories of a category, if the
+ target page (and talk page, if -allowsplit is not set)
+ doesn't exist.
+ -keepsortkey - Use sortKey of the old category also for the new category.
+ If not specified, sortKey is removed.
+ An alternative method to keep sortKey is to use -inplace
+ option.
Options for "tidy" action:
- * -namespaces Filter the arcitles in the specified namespaces. Separate
- -namespace multiple namespace numbers or names with commas. Examples:
- -ns -ns:0,2,4
- -ns:Help,MediaWiki
+ -namespaces Filter the arcitles in the specified namespaces. Separate
+ -namespace multiple namespace numbers or names with commas. Examples:
+ -ns -ns:0,2,4
+ -ns:Help,MediaWiki
Options for several actions:
- * -rebuild - Reset the database.
- * -from: - The category to move from (for the move option)
- Also, the category to remove from in the remove option
- Also, the category to make a list of in the listify option.
- * -to: - The category to move to (for the move option).
- - Also, the name of the list to make in the listify option.
- NOTE: If the category names have spaces in them you may need to use
- a special syntax in your shell so that the names aren't treated as
- separate parameters. For instance, in BASH, use single quotes,
- e.g. -from:'Polar bears'.
- * -batch - Don't prompt to delete emptied categories (do it
- automatically).
- * -summary: - Pick a custom edit summary for the bot.
- * -inplace - Use this flag to change categories in place rather than
- rearranging them.
- * -recurse - Recurse through all subcategories of categories.
- * -pagesonly - While removing pages from a category, keep the subpage links
- and do not remove them.
- * -match - Only work on pages whose titles match the given regex (for
- move and remove actions).
- * -depth: - The max depth limit beyond which no subcategories will be
- listed.
+ -rebuild - Reset the database.
+ -from: - The category to move from (for the move option)
+ Also, the category to remove from in the remove option
+ Also, the category to make a list of in the listify option.
+ -to: - The category to move to (for the move option).
+ - Also, the name of the list to make in the listify option.
+ NOTE: If the category names have spaces in them you may need to use
+ a special syntax in your shell so that the names aren't treated as
+ separate parameters. For instance, in BASH, use single quotes,
+ e.g. -from:'Polar bears'.
+ -batch - Don't prompt to delete emptied categories (do it
+ automatically).
+ -summary: - Pick a custom edit summary for the bot.
+ -inplace - Use this flag to change categories in place rather than
+ rearranging them.
+ -recurse - Recurse through all subcategories of categories.
+ -pagesonly - While removing pages from a category, keep the subpage links
+ and do not remove them.
+ -match - Only work on pages whose titles match the given regex (for
+ move and remove actions).
+ -depth: - The max depth limit beyond which no subcategories will be
+ listed.
For the actions tidy and tree, the bot will store the category structure
locally in category.dump. This saves time and server load, but if it uses
diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index 6a53ba1..6e9b208 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -10,6 +10,8 @@
that haven't been edited for a certain cooldown period (currently 7 days)
are taken into account.
+The following parameters are supported:
+
-delay:# Set an amount of days. If the category is edited more recenty
than given days, ignore it. Default is 7.
diff --git a/scripts/commons_link.py b/scripts/commons_link.py
index da7afd8..2772f02 100755
--- a/scripts/commons_link.py
+++ b/scripts/commons_link.py
@@ -9,18 +9,18 @@
an article in Commons will not be in English but with
redirect, this also functions.
-Run:
Syntax:
python pwb.py commons_link [action] [pagegenerator]
-where action can be one of these:
+where action can be one of these
+
* pages : Run over articles, include {{commons}}
* categories : Run over categories, include {{commonscat}}
and pagegenerator can be one of these:
-¶ms;
+¶ms;
"""
#
# (C) Leonardo Gregianin, 2006
diff --git a/scripts/commonscat.py b/scripts/commonscat.py
index 473db6a..f2ddfce 100755
--- a/scripts/commonscat.py
+++ b/scripts/commonscat.py
@@ -8,10 +8,7 @@
You could probably use it at articles as well, but this isn't tested.
-This bot uses pagegenerators to get a list of pages. The following options are
-supported:
-
-¶ms;
+The following parameters are supported:
-always Don't prompt you for each replacement. Warning message
has not to be confirmed. ATTENTION: Use this with care!
@@ -22,6 +19,11 @@
-checkcurrent Work on all category pages that use the primary commonscat
template.
+This bot uses pagegenerators to get a list of pages. The following options are
+supported:
+
+¶ms;
+
For example to go through all categories:
python pwb.py commonscat -start:Category:!
diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py
index e8c9c2d..b937764 100644
--- a/scripts/cosmetic_changes.py
+++ b/scripts/cosmetic_changes.py
@@ -7,8 +7,6 @@
The following parameters are supported:
-¶ms;
-
-always Don't prompt you for each replacement. Warning (see below)
has not to be confirmed. ATTENTION: Use this with care!
@@ -21,6 +19,10 @@
-ignore: Ignores if an error occurred and either skips the page or
only that method. It can be set to 'page' or 'method'.
+The following generators and filters are supported:
+
+¶ms;
+
&warning;
For further information see pywikibot/cosmetic_changes.py
diff --git a/scripts/delete.py b/scripts/delete.py
index 759036b..18cbec7 100755
--- a/scripts/delete.py
+++ b/scripts/delete.py
@@ -31,10 +31,12 @@
-orphansonly: Specified namespaces. Separate multiple namespace
numbers or names with commas.
Examples:
+
-orphansonly:0,2,4
-orphansonly:Help,MediaWiki
Note that Main ns can be indicated either with a 0 or a ',':
+
-orphansonly:0,1
-orphansonly:,Talk
@@ -45,7 +47,7 @@
Examples
--------
-Delete everything in the category "To delete" without prompting.
+Delete everything in the category "To delete" without prompting:
python pwb.py delete -cat:"To delete" -always
"""
diff --git a/scripts/editarticle.py b/scripts/editarticle.py
index f23d4e8..56c5ea0 100755
--- a/scripts/editarticle.py
+++ b/scripts/editarticle.py
@@ -3,11 +3,13 @@
"""
Edit a Wikipedia article with your favourite editor.
- TODO: - non existing pages
- - edit conflicts
- - minor edits
- - watch/unwatch
- - ...
+TODO:
+
+ - non existing pages
+ - edit conflicts
+ - minor edits
+ - watch/unwatch
+ - ...
The following parameters are supported:
diff --git a/scripts/fixing_redirects.py b/scripts/fixing_redirects.py
index f84e0c7..226e336 100755
--- a/scripts/fixing_redirects.py
+++ b/scripts/fixing_redirects.py
@@ -3,11 +3,11 @@
"""
Correct all redirect links in featured pages or only one page of each wiki.
-Can be using with:
-¶ms;
+Can be used with:
-featured Run over featured pages (for some wikimedia wikis only)
+¶ms;
"""
#
# (C) Pywikibot team, 2004-2019
diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py
index 294f7f3..c9cb22f 100755
--- a/scripts/flickrripper.py
+++ b/scripts/flickrripper.py
@@ -3,6 +3,8 @@
"""
A tool to transfer flickr photos to Wikimedia Commons.
+The following parameters are supported:
+
-group_id: specify group ID of the pool
-photoset_id: specify a photoset id
-user_id: give the user id of the flickrriper user
diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index 8b1fa45..a0f8cbe 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -5,11 +5,11 @@
Usage (see below for explanations and examples):
-- python pwb.py harvest_template -transcludes:"..." \
+ python pwb.py harvest_template -transcludes:"..." \
[default optional arguments] \
template_parameter PID [local optional arguments] \
[template_parameter PID [local optional arguments]]
-- python pwb.py harvest_template [generators] -template:"..." \
+ python pwb.py harvest_template [generators] -template:"..." \
[default optional arguments] \
template_parameter PID [local optional arguments] \
[template_parameter PID [local optional arguments]]
@@ -30,7 +30,7 @@
all param-property pairs. If you specify them after a param-property pair,
they are local and are only applied to this pair. If you specify the same
argument as both local and global, the local argument overrides the global one
-(see also examples).
+(see also examples):
-islink Treat plain text values as links ("text" -> "[[text]]").
diff --git a/scripts/imagecopy.py b/scripts/imagecopy.py
index 00a54c7..962eefd 100644
--- a/scripts/imagecopy.py
+++ b/scripts/imagecopy.py
@@ -19,8 +19,6 @@
Command line options:
-¶ms;
-
-always Skip the GUI validation
-setcat: Set the category of the copied image
@@ -29,27 +27,30 @@
only work if the user has sysops privileges, otherwise the image
will only be marked for deletion.
-Examples
+¶ms;
-Work on a single image::
+Examples
+--------
+
+Work on a single image:
python pwb.py imagecopy -page:Image:<imagename>
-Work on the 100 newest images::
+Work on the 100 newest images:
python pwb.py imagecopy -newimages:100
-Work on all images in a category:<cat>::
+Work on all images in a category:<cat>:
python pwb.py imagecopy -cat:<cat>
-Work on all images which transclude a template::
+Work on all images which transclude a template:
python pwb.py imagecopy -transcludes:<template>
Work on a single image and deletes the image when the transfer is complete
(only works if the user has sysops privilege, otherwise it will be marked for
-deletion)::
+deletion):
python pwb.py imagecopy -page:Image:<imagename> -delete
diff --git a/scripts/imagecopy_self.py b/scripts/imagecopy_self.py
index f132d04..127216f 100644
--- a/scripts/imagecopy_self.py
+++ b/scripts/imagecopy_self.py
@@ -9,6 +9,7 @@
only environment.
Examples
+--------
Work on a single file:
diff --git a/scripts/imageharvest.py b/scripts/imageharvest.py
index c437253..ce844bb 100644
--- a/scripts/imageharvest.py
+++ b/scripts/imageharvest.py
@@ -13,6 +13,7 @@
itself, you will have to change the bot code, my apologies).
Other options:
+
-shown Choose images shown on the page as well as linked from it
-justshown Choose _only_ images shown on the page, not those linked
"""
diff --git a/scripts/imagetransfer.py b/scripts/imagetransfer.py
index 56d1c58..eca4a5d 100755
--- a/scripts/imagetransfer.py
+++ b/scripts/imagetransfer.py
@@ -7,7 +7,7 @@
python pwb.py imagetransfer {<pagename>|<generator>} [<options>]
-Arguments:
+The following parameters are supported:
-interwiki Look for images in pages found through interwiki links.
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index 9739457..3e521c5 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -12,8 +12,6 @@
These command-line arguments can be used to specify which pages to work on:
-¶ms;
-
-days: Like -years, but runs through all date pages. Stops at
Dec 31. If the argument is given in the form -days:X,
it will start at month no. X through Dec 31. If the
@@ -61,6 +59,8 @@
against the live wiki is using the warnfile.py
script.
+¶ms;
+
Additionally, these arguments can be used to restrict the bot to certain pages:
-namespace:n Number or name of namespace to process. The parameter can be
diff --git a/scripts/login.py b/scripts/login.py
index db88707..edf820e 100755
--- a/scripts/login.py
+++ b/scripts/login.py
@@ -6,7 +6,7 @@
Suggestion is to make a special account to use for bot use only. Make
sure this bot account is well known on your home wiki before using.
-Parameters:
+The following parameters are supported:
-family:FF
-lang:LL Log in to the LL language of the FF family.
diff --git a/scripts/lonelypages.py b/scripts/lonelypages.py
index 894e806..c2c54d2 100755
--- a/scripts/lonelypages.py
+++ b/scripts/lonelypages.py
@@ -17,7 +17,7 @@
-always Always say yes, won't ask
---- Examples ---
+Example:
python pwb.py lonelypages -enable:User:Bot/CheckBot -always
"""
diff --git a/scripts/maintenance/cache.py b/scripts/maintenance/cache.py
index 9c29041..8197650 100755
--- a/scripts/maintenance/cache.py
+++ b/scripts/maintenance/cache.py
@@ -12,6 +12,8 @@
If no command is specified, it will print the filename of all entries.
If only -delete is specified, it will delete all entries.
+The following parameters are supported:
+
-delete Delete each command filtered. If that option is set the
default output will be nothing.
@@ -22,6 +24,7 @@
True. If it returns None it won't output anything.
Example commands:
+
Print the filename of any entry with 'wikidata' in the key:
-c "wikidata" in entry._uniquedescriptionstr()
@@ -42,6 +45,7 @@
-o uniquedesc
Available filter commands:
+
has_password(entry)
is_logout(entry)
empty_response(entry)
diff --git a/scripts/makecat.py b/scripts/makecat.py
index 86f034a..65d60a4 100755
--- a/scripts/makecat.py
+++ b/scripts/makecat.py
@@ -25,13 +25,13 @@
-all Work on all pages (default: only main namespace)
When running the bot, you will get one by one a number by pages.
-You can choose:
+You can choose
* [y]es - include the page
* [n]o - do not include the page or
* [i]gnore - do not include the page, but if you meet it again, ask again.
-Other possibilities:
+Other possibilities
* [m]ore - show more content of the page starting from the beginning
* sort [k]ey - add with sort key like [[Category|Title]]
diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py
index ca899aa..8bee681 100755
--- a/scripts/nowcommons.py
+++ b/scripts/nowcommons.py
@@ -14,6 +14,7 @@
this script to work properly.
This script understands various command-line arguments:
+
-always run automatically, do not ask any questions. All files
that qualify for deletion are deleted. Reduced screen
output.
diff --git a/scripts/patrol.py b/scripts/patrol.py
index 9a32abd..b15c637 100755
--- a/scripts/patrol.py
+++ b/scripts/patrol.py
@@ -7,7 +7,7 @@
edits as patrolled based on a whitelist.
Whitelist format
-================
+~~~~~~~~~~~~~~~~
The whitelist is formatted as a number of list entries. Any links outside of
lists are ignored and can be used for documentation. In a list the first link
@@ -26,8 +26,7 @@
An example can be found at
https://en.wikisource.org/wiki/User:Wikisource-bot/patrol_whitelist
-Commandline parameters
-======================
+Commandline parameters:
-namespace Filter the page generator to only yield pages in
specified namespaces
diff --git a/scripts/piper.py b/scripts/piper.py
index 1cfcd9e..1a47f42 100755
--- a/scripts/piper.py
+++ b/scripts/piper.py
@@ -20,13 +20,15 @@
The following parameters are supported:
-¶ms;
-
-always Always commit changes without asking you to accept them
-filter: Filter the article text through this program, can be
given multiple times to filter through multiple programs in
the order which they are given
+
+The following generators and filters are supported:
+
+¶ms;
"""
#
# (C) Pywikibot team, 2008-2019
diff --git a/scripts/protect.py b/scripts/protect.py
index 126f536..b2fd560 100755
--- a/scripts/protect.py
+++ b/scripts/protect.py
@@ -36,16 +36,18 @@
parameters -unprotect or -default are used, only the last occurrence
is applied.
-Usage: python protect.py <OPTIONS>
+Usage:
+
+ python pwb.py protect <OPTIONS>
Examples
--------
-Protect everything in the category 'To protect' prompting.
+Protect everything in the category 'To protect' prompting:
python pwb.py protect -cat:"To protect"
-Unprotect all pages listed in text file 'unprotect.txt' without prompting.
+Unprotect all pages listed in text file 'unprotect.txt' without prompting:
python pwb.py protect -file:unprotect.txt -unprotect -always
"""
diff --git a/scripts/redirect.py b/scripts/redirect.py
index f75f360..02d319f 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -10,7 +10,7 @@
python pwb.py redirect action [-arguments ...]
-where action can be one of these:
+where action can be one of these
:double: Shortcut: **do**. Fix redirects which point to other redirects.
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index 97fdba5..1963ff5 100755
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -19,7 +19,7 @@
pdfinfo is needed for parsing pdf titles.
-¶ms;
+The following parameters are supported:
-limit:n Stops after n edits
@@ -33,6 +33,10 @@
-summary Use a custom edit summary. Otherwise it uses the default
one from i18n/reflinks.py
+
+The following generators and filters are supported:
+
+¶ms;
"""
# (C) Nicolas Dumazet (NicDumZ), 2008
# (C) Pywikibot team, 2008-2019
diff --git a/scripts/revertbot.py b/scripts/revertbot.py
index 9ae98e4..4005f64 100755
--- a/scripts/revertbot.py
+++ b/scripts/revertbot.py
@@ -17,8 +17,6 @@
Users who want to customize the behaviour should subclass the `BaseRevertBot`
and override its `callback` method. Here is a sample:
-.. code-block::
-
class myRevertBot(BaseRevertBot):
'''Example revert bot.'''
diff --git a/scripts/selflink.py b/scripts/selflink.py
index e1c4e7d..e7bffc4 100755
--- a/scripts/selflink.py
+++ b/scripts/selflink.py
@@ -3,12 +3,14 @@
"""
This bot searches for selflinks and allows removing them.
-These command line parameters can be used to specify which pages to work on:
-
-¶ms;
+The following parameters are supported:
-always Unlink always but don't prompt you for each replacement.
ATTENTION: Use this with care!
+
+These command line parameters can be used to specify which pages to work on:
+
+¶ms;
"""
#
# (C) Pywikibot team, 2006-2019
diff --git a/scripts/spamremove.py b/scripts/spamremove.py
index 1493934..bcabbe0 100755
--- a/scripts/spamremove.py
+++ b/scripts/spamremove.py
@@ -9,12 +9,14 @@
It will use Special:Linksearch to find the pages on the wiki that link to
that site, then for each page make a proposed change consisting of removing
-all the lines where that url occurs. You can choose to:
+all the lines where that url occurs. You can choose to
+
* accept the changes as proposed
* edit the page yourself to remove the offending link
* not change the page in question
Command line options:
+
-always Do not ask, but remove the lines automatically. Be very
careful in using this option!
diff --git a/scripts/states_redirect.py b/scripts/states_redirect.py
index f78feab..7b1e8a1 100755
--- a/scripts/states_redirect.py
+++ b/scripts/states_redirect.py
@@ -6,10 +6,12 @@
from Something, ST.
Specific arguments:
+
-start:xxx Specify the place in the alphabet to start searching
-force: Don't ask whether to create pages, just create them.
PRE-REQUISITE : Need to install python-pycountry library.
+
* Follow the instructions at: https://www.versioneye.com/python/pycountry/0.16
* Install with pip: pip install pycountry
"""
diff --git a/scripts/surnames_redirects.py b/scripts/surnames_redirects.py
index 224727d..3a422c6 100755
--- a/scripts/surnames_redirects.py
+++ b/scripts/surnames_redirects.py
@@ -8,12 +8,14 @@
Command-line arguments:
-¶ms;
-
-surnames_last Creates a "Given Names Surnames" redirect version of a
given page where title is "Surnames, Given Names".
-Example: "python pwb.py surnames_redirects -start:B"
+¶ms;
+
+Example:
+
+ python pwb.py surnames_redirects -start:B
"""
#
# (C) Pywikibot team, 2017-2019
diff --git a/scripts/table2wiki.py b/scripts/table2wiki.py
index 347537e..f1f39e3 100644
--- a/scripts/table2wiki.py
+++ b/scripts/table2wiki.py
@@ -7,6 +7,8 @@
¶ms;
+The following parameters are supported:
+
-always The bot won't ask for confirmation when putting
a page.
@@ -31,10 +33,12 @@
python pwb.py table2wiki -xml:20050713_pages_current.xml -lang:de
FEATURES
+
Save against missing </td>
Corrects attributes of tags
KNOWN BUGS
+
Broken HTML tables will most likely result in broken wiki tables!
Please check every article you change.
"""
diff --git a/scripts/template.py b/scripts/template.py
index ef857d0..7498e6a 100755
--- a/scripts/template.py
+++ b/scripts/template.py
@@ -5,8 +5,10 @@
It also converts the old MediaWiki boilerplate format to the new format.
-Syntax: python pwb.py template [-remove] [xml[:filename]] oldTemplate \
- [newTemplate]
+Syntax:
+
+ python pwb.py template [-remove] [xml[:filename]] oldTemplate \
+ [newTemplate]
Specify the template on the command line. The program will pick up the template
page, and look for all pages using it. It will then automatically loop over
@@ -55,7 +57,6 @@
other: First argument is the old template name, second one is the new
name.
-
If you want to address a template which has spaces, put quotation
marks around it, or use underscores.
@@ -63,7 +64,7 @@
--------
If you have a template called [[Template:Cities in Washington]] and want to
-change it to [[Template:Cities in Washington state]], start
+change it to [[Template:Cities in Washington state]], start:
python pwb.py template "Cities in Washington" "Cities in Washington state"
@@ -80,7 +81,7 @@
This next example substitutes the template lived with a supplied edit summary.
It only performs substitutions in main article namespace and doesn't prompt to
-start replacing. Note that -putthrottle: is a global Pywikibot parameter.
+start replacing. Note that -putthrottle: is a global Pywikibot parameter:
python pwb.py template -putthrottle:30 -namespace:0 lived -subst -always \
-summary:"BOT: Substituting {{lived}}, see [[WP:SUBST]]."
diff --git a/scripts/templatecount.py b/scripts/templatecount.py
index 01159dc..a049ec3 100755
--- a/scripts/templatecount.py
+++ b/scripts/templatecount.py
@@ -6,7 +6,9 @@
It can also be used to simply count the number of pages (rather than
listing each individually).
-Syntax: python pwb.py templatecount options templates
+Syntax:
+
+ python pwb.py templatecount options templates
Command line options:
diff --git a/scripts/touch.py b/scripts/touch.py
index cb78bb9..a7dd016 100755
--- a/scripts/touch.py
+++ b/scripts/touch.py
@@ -8,10 +8,10 @@
This script understands various command-line arguments:
-¶ms;
-
-purge Do not touch but purge the page
+¶ms;
+
Touch arguments:
-botflag Force botflag in case of edits with changes.
diff --git a/scripts/transferbot.py b/scripts/transferbot.py
index ee92924..2565bb8 100755
--- a/scripts/transferbot.py
+++ b/scripts/transferbot.py
@@ -5,6 +5,8 @@
It also copies edit history to a subpage.
+The following parameters are supported:
+
-tolang: The target site code.
-tofamily: The target site family.
diff --git a/scripts/unlink.py b/scripts/unlink.py
index 908fe4f..dd45f4a 100755
--- a/scripts/unlink.py
+++ b/scripts/unlink.py
@@ -14,11 +14,13 @@
Any other parameter will be regarded as the title of the page
that should be unlinked.
-Example:
+Example
+-------
+
+Removes links to the page [[Foo bar]] in articles and image
+descriptions:
python pwb.py unlink "Foo bar" -namespace:0 -namespace:6
- Removes links to the page [[Foo bar]] in articles and image
- descriptions.
"""
#
# (C) Pywikibot team, 2007-2019
diff --git a/scripts/upload.py b/scripts/upload.py
index 723ac05..12ae861 100755
--- a/scripts/upload.py
+++ b/scripts/upload.py
@@ -3,7 +3,7 @@
"""
Script to upload images to wikipedia.
-Arguments:
+The following parameters are supported:
-keep Keep the filename as is
-filename: Target filename without the namespace prefix
diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py
index 320c8b8..f8cb5ca 100755
--- a/scripts/weblinkchecker.py
+++ b/scripts/weblinkchecker.py
@@ -32,8 +32,6 @@
These command line parameters can be used to specify which pages to work on:
-¶ms;
-
-repeat Work on all pages were dead links were found before. This is
useful to confirm that the links are dead after some time (at
least one week), which is required before the script will report
@@ -50,6 +48,8 @@
-ignore HTTP return codes to ignore. Can be provided several times :
-ignore:401 -ignore:500
+¶ms;
+
Furthermore, the following command line parameters are supported:
-talk Overrides the report_dead_links_on_talk config variable, enabling
@@ -79,23 +79,30 @@
weblink_dead_days sets the timespan (default: one week) after which
a dead link will be reported
-Syntax examples:
+Examples
+--------
+
+Loads all wiki pages in alphabetical order using the Special:Allpages
+feature:
+
python pwb.py weblinkchecker -start:!
- Loads all wiki pages in alphabetical order using the Special:Allpages
- feature.
+
+Loads all wiki pages using the Special:Allpages feature, starting at
+"Example page":
python pwb.py weblinkchecker -start:Example_page
- Loads all wiki pages using the Special:Allpages feature, starting at
- "Example page"
+
+Loads all wiki pages that link to www.example.org:
python pwb.py weblinkchecker -weblink:www.example.org
- Loads all wiki pages that link to www.example.org
+
+Only checks links found in the wiki page "Example page":
python pwb.py weblinkchecker Example page
- Only checks links found in the wiki page "Example page"
+
+Loads all wiki pages where dead links were found during a prior run:
python pwb.py weblinkchecker -repeat
- Loads all wiki pages where dead links were found during a prior run
"""
#
# (C) Daniel Herding, 2005
diff --git a/scripts/welcome.py b/scripts/welcome.py
index 626fdb0..e1ed709 100755
--- a/scripts/welcome.py
+++ b/scripts/welcome.py
@@ -12,7 +12,7 @@
Everything that needs customisation to support additional projects is
indicated by comments.
-Description of basic functionality:
+Description of basic functionality
* Request a list of new users every period (default: 3600 seconds)
You can choose to break the script after the first check (see arguments)
@@ -29,7 +29,8 @@
* If no log page exists, create a header for the log page first.
This script (by default not yet implemented) uses two templates that need to
-be on the local wiki:
+be on the local wiki
+
* {{WLE}}: contains mark up code for log entries (just copy it from Commons)
* {{welcome}}: contains the information for new users
@@ -96,7 +97,7 @@
of the whitelist is in the username. If yes it remove the word and
recheck in the bad word list to see if there are other badword in the
username.
- Example:
+ Example
* dio is a badword
* Claudio is a normal name
@@ -105,14 +106,16 @@
* The Bot finds Claudio and sets "ok"
* The Bot finds fuck at the end and sets "warning"
* Result: The username is reported.
-4) When a user is reported you have to check him and do:
+4) When a user is reported you have to check him and do
+
* If he's ok, put the {{welcome}}
* If he's not, block him
* You can decide to put a "you are blocked, change another username"
template or not.
* Delete the username from the page.
- IMPORTANT : The Bot check the user in this order:
+ IMPORTANT : The Bot check the user in this order
+
* Search if he has a talkpage (if yes, skip)
* Search if he's blocked, if yes he will be skipped
* Search if he's in the report page, if yes he will be skipped
@@ -132,10 +135,11 @@
<NEW LINE>
Example:
-<pre>
-* [[User:Filnik|Filnik]]
-* [[User:Rock|Rock]]
-</pre>
+
+ <pre>
+ * [[User:Filnik|Filnik]]
+ * [[User:Rock|Rock]]
+ </pre>
NOTE: The white space and <pre></pre> aren't required but I suggest you to
use them.
diff --git a/scripts/wikisourcetext.py b/scripts/wikisourcetext.py
index d340d31..074ce6a 100644
--- a/scripts/wikisourcetext.py
+++ b/scripts/wikisourcetext.py
@@ -14,7 +14,7 @@
In this case, also already existing pages with quality value 'Not Proofread'
can be treated. '-force' will override existing page in this case.
-# TODO: update params + handle quality level
+TODO: update params + handle quality level
The following parameters are supported:
--
To view, visit https://gerrit.wikimedia.org/r/509479
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1d98896006305b44d87448fa8caa13ca5b7912e4
Gerrit-Change-Number: 509479
Gerrit-PatchSet: 10
Gerrit-Owner: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki(a)aol.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)