jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[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(-)

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 change 509534. To unsubscribe, or for help writing mail filters, visit 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@seznam.cz>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)