jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1329383?usp=email )
Change subject: docs: Correct examples and script descriptions
......................................................................
docs: Correct examples and script descriptions
Accept varargs in the sample main function so handle_args receives the
documented arguments.
Fix a misspelled import, stale script names, and the replace script summary.
Change-Id: Iadad4e0ea2a675c2830724f44cc3e039516d2ad9
---
M README.rst
M docs/recipes.rst
M scripts/README.rst
3 files changed, 6 insertions(+), 8 deletions(-)
Approvals:
JJMC89: Looks good to me, approved
jenkins-bot: Verified
diff --git a/README.rst b/README.rst
index 642df97..81ae5fc 100644
--- a/README.rst
+++ b/README.rst
@@ -115,7 +115,7 @@
text += '\n' + self.opt.text
self.put_current(text, summary=self.opt.summary)
- def main():
+ def main(*args: str) -> None:
"""Parse command line arguments and invoke bot."""
options = {}
gen_factory = pagegenerators.GeneratorFactory()
diff --git a/docs/recipes.rst b/docs/recipes.rst
index cfa3487..9f5b70c 100644
--- a/docs/recipes.rst
+++ b/docs/recipes.rst
@@ -17,7 +17,7 @@
=============================================
>>> import pywikibot
->>> from pwikibot import textlib
+>>> from pywikibot import textlib
>>> site = pywikibot.Site('wikipedia:en') # create a Site object
>>> page = pywikibot.Page(site, 'Deep learning') # create a Page object
>>> sect = textlib.extract_sections(page.text, site) # divide content into
>>> sections
diff --git a/scripts/README.rst b/scripts/README.rst
index 6d9a38d..46304c8 100644
--- a/scripts/README.rst
+++ b/scripts/README.rst
@@ -51,7 +51,7 @@
+--------------------------+---------------------------------------------------------+
| basic.py | Is a template from which simple bots can be made.
|
+--------------------------+---------------------------------------------------------+
-| blockpagechecker.py | Deletes any protection templates that are on
pages |
+| blockpageschecker.py | Deletes any protection templates that are on
pages |
| | which aren't actually protected.
|
+--------------------------+---------------------------------------------------------+
| category.py | Add a category link to all pages mentioned on a
page, |
@@ -145,10 +145,8 @@
| | without title and fetch the html title from the
link to |
| | use it as the title of the wiki link in the
reference. |
+--------------------------+---------------------------------------------------------+
-| replace.py | Search articles for a text and replace it by
another |
-| | text. Both text are set in two configurable
|
-| | text files. The bot can either work on a set of
given |
-| | pages or crawl an SQL dump.
|
+| replace.py | Replaces text on pages using command-line pairs,
|
+| | a pairs file, or predefined fixes.
|
+--------------------------+---------------------------------------------------------+
| replicate_wiki.py | Replicates pages in wiki to a second wiki within
family |
+--------------------------+---------------------------------------------------------+
@@ -179,7 +177,7 @@
+--------------------------+---------------------------------------------------------+
| upload.py | Upload an image to a wiki.
|
+--------------------------+---------------------------------------------------------+
-| watchlists.py | Allows access to the account's watchlist.
|
+| watchlist.py | Allows access to the account's watchlist.
|
+--------------------------+---------------------------------------------------------+
| weblinkchecker.py | Check if external links are still working.
|
+--------------------------+---------------------------------------------------------+
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1329383?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Iadad4e0ea2a675c2830724f44cc3e039516d2ad9
Gerrit-Change-Number: 1329383
Gerrit-PatchSet: 1
Gerrit-Owner: Mahveotm <[email protected]>
Gerrit-Reviewer: JJMC89 <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]