jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/370161 )
Change subject: [bugfix] Fix scripts path in metafile
......................................................................
[bugfix] Fix scripts path in metafile
- Update some scripts to pass reStructuredText parsing
- remove todo list from imagecopy.py doc. Task is T172595 now.
- remove todo list from imagecopy_self.py (Task T172597)
- hide some script until doc string is clean
Bug: T109557
Change-Id: Idada955b724fd7629e9b81ac897eb9e2b51e4e68
---
M docs/scripts/scripts.rst
M scripts/catall.py
M scripts/claimit.py
M scripts/imagecopy.py
M scripts/imagecopy_self.py
5 files changed, 86 insertions(+), 158 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/scripts/scripts.rst b/docs/scripts/scripts.rst
index b500bb4..44ecbc9 100644
--- a/docs/scripts/scripts.rst
+++ b/docs/scripts/scripts.rst
@@ -20,7 +20,7 @@
scripts.add_text script
-----------------------
-.. automodule:: script.add_text
+.. automodule:: scripts.add_text
:members:
:undoc-members:
:show-inheritance:
@@ -29,16 +29,11 @@
scripts.archivebot script
-------------------------
-.. automodule:: script.archivebot
- :members:
- :undoc-members:
- :show-inheritance:
-
scripts.basic script
--------------------
-.. automodule:: script.basic
+.. automodule:: scripts.basic
:members:
:undoc-members:
:show-inheritance:
@@ -47,7 +42,7 @@
scripts.blockpagechecker script
-------------------------------
-.. automodule:: script.blockpagechecker
+.. automodule:: scripts.blockpagechecker
:members:
:undoc-members:
:show-inheritance:
@@ -56,7 +51,7 @@
scripts.capitalize_redirects script
-----------------------------------
-.. automodule:: script.capitalize_redirects
+.. automodule:: scripts.capitalize_redirects
:members:
:undoc-members:
:show-inheritance:
@@ -65,7 +60,7 @@
scripts.catall script
---------------------
-.. automodule:: script.catall
+.. automodule:: scripts.catall
:members:
:undoc-members:
:show-inheritance:
@@ -74,7 +69,7 @@
scripts.category script
-----------------------
-.. automodule:: script.category
+.. automodule:: scripts.category
:members:
:undoc-members:
:show-inheritance:
@@ -83,7 +78,7 @@
scripts.cfd script
------------------
-.. automodule:: script.cfd
+.. automodule:: scripts.cfd
:members:
:undoc-members:
:show-inheritance:
@@ -92,7 +87,7 @@
scripts.checkimages script
--------------------------
-.. automodule:: script.checkimages
+.. automodule:: scripts.checkimages
:members:
:undoc-members:
:show-inheritance:
@@ -101,7 +96,7 @@
scripts.claimit script
----------------------
-.. automodule:: script.claimit
+.. automodule:: scripts.claimit
:members:
:undoc-members:
:show-inheritance:
@@ -110,7 +105,7 @@
scripts.clean_sandbox script
----------------------------
-.. automodule:: script.clean_sandboy
+.. automodule:: scripts.clean_sandboy
:members:
:undoc-members:
:show-inheritance:
@@ -119,7 +114,7 @@
scripts.commons_link script
---------------------------
-.. automodule:: script.commons_link
+.. automodule:: scripts.commons_link
:members:
:undoc-members:
:show-inheritance:
@@ -128,7 +123,7 @@
scripts.commonscat script
-------------------------
-.. automodule:: script.commonscat
+.. automodule:: scripts.commonscat
:members:
:undoc-members:
:show-inheritance:
@@ -137,7 +132,7 @@
scripts.coodinate_import script
-------------------------------
-.. automodule:: script.coodinate_import
+.. automodule:: scripts.coodinate_import
:members:
:undoc-members:
:show-inheritance:
@@ -146,7 +141,7 @@
scripts.cosmetic_changes script
-------------------------------
-.. automodule:: script.cosmetic_changes
+.. automodule:: scripts.cosmetic_changes
:members:
:undoc-members:
:show-inheritance:
@@ -155,7 +150,7 @@
scripts.create_categories script
--------------------------------
-.. automodule:: script.create_categories
+.. automodule:: scripts.create_categories
:members:
:undoc-members:
:show-inheritance:
@@ -164,7 +159,7 @@
scripts.data_ingestion script
-----------------------------
-.. automodule:: script.data_ingestion
+.. automodule:: scripts.data_ingestion
:members:
:undoc-members:
:show-inheritance:
@@ -173,7 +168,7 @@
scripts.delete script
---------------------
-.. automodule:: script.delete
+.. automodule:: scripts.delete
:members:
:undoc-members:
:show-inheritance:
@@ -182,7 +177,7 @@
scripts.disambredir script
--------------------------
-.. automodule:: script.disambredir
+.. automodule:: scripts.disambredir
:members:
:undoc-members:
:show-inheritance:
@@ -191,7 +186,7 @@
scripts.djvutext script
-----------------------
-.. automodule:: script.djvutext
+.. automodule:: scripts.djvutext
:members:
:undoc-members:
:show-inheritance:
@@ -200,7 +195,7 @@
scripts.editarticle script
--------------------------
-.. automodule:: script.editarticle
+.. automodule:: scripts.editarticle
:members:
:undoc-members:
:show-inheritance:
@@ -209,7 +204,7 @@
scripts.fixing_redirects script
-------------------------------
-.. automodule:: script.fixing_redirects
+.. automodule:: scripts.fixing_redirects
:members:
:undoc-members:
:show-inheritance:
@@ -218,7 +213,7 @@
scripts.flickrripper script
---------------------------
-.. automodule:: script.flickrripper
+.. automodule:: scripts.flickrripper
:members:
:undoc-members:
:show-inheritance:
@@ -227,7 +222,7 @@
scripts.followlive script
-------------------------
-.. automodule:: script.followlive
+.. automodule:: scripts.followlive
:members:
:undoc-members:
:show-inheritance:
@@ -236,7 +231,7 @@
scripts.freebasemappingupload script
------------------------------------
-.. automodule:: script.freebasemappingupload
+.. automodule:: scripts.freebasemappingupload
:members:
:undoc-members:
:show-inheritance:
@@ -245,16 +240,11 @@
scripts.harvest_template script
-------------------------------
-.. automodule:: script.harvest_template
- :members:
- :undoc-members:
- :show-inheritance:
-
scripts.illustrate_wikidata script
----------------------------------
-.. automodule:: script.illustrate_wikidata
+.. automodule:: scripts.illustrate_wikidata
:members:
:undoc-members:
:show-inheritance:
@@ -263,7 +253,7 @@
scripts.image script
--------------------
-.. automodule:: script.image
+.. automodule:: scripts.image
:members:
:undoc-members:
:show-inheritance:
@@ -272,7 +262,7 @@
scripts.imagecopy script
------------------------
-.. automodule:: script.imagecopy
+.. automodule:: scripts.imagecopy
:members:
:undoc-members:
:show-inheritance:
@@ -281,7 +271,7 @@
scripts.imagecopy_self script
-----------------------------
-.. automodule:: script.imagecopy_self
+.. automodule:: scripts.imagecopy_self
:members:
:undoc-members:
:show-inheritance:
@@ -290,7 +280,7 @@
scripts.imageharvest script
---------------------------
-.. automodule:: script.imageharvest
+.. automodule:: scripts.imageharvest
:members:
:undoc-members:
:show-inheritance:
@@ -299,7 +289,7 @@
scripts.imagerecat script
-------------------------
-.. automodule:: script.imagerecat
+.. automodule:: scripts.imagerecat
:members:
:undoc-members:
:show-inheritance:
@@ -308,7 +298,7 @@
scripts.imagetransfer script
----------------------------
-.. automodule:: script.imagetransfer
+.. automodule:: scripts.imagetransfer
:members:
:undoc-members:
:show-inheritance:
@@ -317,7 +307,7 @@
scripts.imageuncat script
-------------------------
-.. automodule:: script.imageuncat
+.. automodule:: scripts.imageuncat
:members:
:undoc-members:
:show-inheritance:
@@ -326,16 +316,11 @@
scripts.interwiki script
------------------------
-.. automodule:: script.interwiki
- :members:
- :undoc-members:
- :show-inheritance:
-
scripts.interwikidata script
----------------------------
-.. automodule:: script.interwikidata
+.. automodule:: scripts.interwikidata
:members:
:undoc-members:
:show-inheritance:
@@ -344,7 +329,7 @@
scripts.isbn script
-------------------
-.. automodule:: script.isbn
+.. automodule:: scripts.isbn
:members:
:undoc-members:
:show-inheritance:
@@ -353,7 +338,7 @@
scripts.listpages script
------------------------
-.. automodule:: script.listpages
+.. automodule:: scripts.listpages
:members:
:undoc-members:
:show-inheritance:
@@ -362,7 +347,7 @@
scripts.login script
--------------------
-.. automodule:: script.login
+.. automodule:: scripts.login
:members:
:undoc-members:
:show-inheritance:
@@ -371,7 +356,7 @@
scripts.lonelypages script
--------------------------
-.. automodule:: script.lonelypages
+.. automodule:: scripts.lonelypages
:members:
:undoc-members:
:show-inheritance:
@@ -380,7 +365,7 @@
scripts.makecat script
----------------------
-.. automodule:: script.makecat
+.. automodule:: scripts.makecat
:members:
:undoc-members:
:show-inheritance:
@@ -389,7 +374,7 @@
scripts.match_images script
---------------------------
-.. automodule:: script.match_images
+.. automodule:: scripts.match_images
:members:
:undoc-members:
:show-inheritance:
@@ -398,7 +383,7 @@
scripts.misspelling script
--------------------------
-.. automodule:: script.misspelling
+.. automodule:: scripts.misspelling
:members:
:undoc-members:
:show-inheritance:
@@ -407,7 +392,7 @@
scripts.movepages script
------------------------
-.. automodule:: script.movepages
+.. automodule:: scripts.movepages
:members:
:undoc-members:
:show-inheritance:
@@ -416,7 +401,7 @@
scripts.ndashredir script
-------------------------
-.. automodule:: script.ndashredir
+.. automodule:: scripts.ndashredir
:members:
:undoc-members:
:show-inheritance:
@@ -425,7 +410,7 @@
scripts.newitem script
----------------------
-.. automodule:: script.newitem
+.. automodule:: scripts.newitem
:members:
:undoc-members:
:show-inheritance:
@@ -434,7 +419,7 @@
scripts.noreferences script
---------------------------
-.. automodule:: script.noreferences
+.. automodule:: scripts.noreferences
:members:
:undoc-members:
:show-inheritance:
@@ -443,7 +428,7 @@
scripts.nowcommons script
-------------------------
-.. automodule:: script.nowcommons
+.. automodule:: scripts.nowcommons
:members:
:undoc-members:
:show-inheritance:
@@ -452,7 +437,7 @@
scripts.pagefromfile script
---------------------------
-.. automodule:: script.pagefromfile
+.. automodule:: scripts.pagefromfile
:members:
:undoc-members:
:show-inheritance:
@@ -461,7 +446,7 @@
scripts.patrol script
---------------------
-.. automodule:: script.patrol
+.. automodule:: scripts.patrol
:members:
:undoc-members:
:show-inheritance:
@@ -470,7 +455,7 @@
scripts.piper script
--------------------
-.. automodule:: script.piper
+.. automodule:: scripts.piper
:members:
:undoc-members:
:show-inheritance:
@@ -479,25 +464,15 @@
scripts.protect script
----------------------
-.. automodule:: script.protect
- :members:
- :undoc-members:
- :show-inheritance:
-
scripts.redirect script
-----------------------
-
-.. automodule:: script.redirect
- :members:
- :undoc-members:
- :show-inheritance:
scripts.reflinks script
-----------------------
-.. automodule:: script.reflinks
+.. automodule:: scripts.reflinks
:members:
:undoc-members:
:show-inheritance:
@@ -506,7 +481,7 @@
scripts.replace script
----------------------
-.. automodule:: script.replace
+.. automodule:: scripts.replace
:members:
:undoc-members:
:show-inheritance:
@@ -515,7 +490,7 @@
scripts.replicate_wiki script
-----------------------------
-.. automodule:: script.replicate_wiki
+.. automodule:: scripts.replicate_wiki
:members:
:undoc-members:
:show-inheritance:
@@ -524,7 +499,7 @@
scripts.revertbot script
------------------------
-.. automodule:: script.revertbot
+.. automodule:: scripts.revertbot
:members:
:undoc-members:
:show-inheritance:
@@ -533,7 +508,7 @@
scripts.script_wui script
-------------------------
-.. automodule:: script.script_wui
+.. automodule:: scripts.script_wui
:members:
:undoc-members:
:show-inheritance:
@@ -542,7 +517,7 @@
scripts.selflink script
-----------------------
-.. automodule:: script.selflink
+.. automodule:: scripts.selflink
:members:
:undoc-members:
:show-inheritance:
@@ -551,7 +526,7 @@
scripts.shell script
--------------------
-.. automodule:: script.shell
+.. automodule:: scripts.shell
:members:
:undoc-members:
:show-inheritance:
@@ -560,7 +535,7 @@
scripts.solve_disambiguation script
-----------------------------------
-.. automodule:: script.solve_disambiguation
+.. automodule:: scripts.solve_disambiguation
:members:
:undoc-members:
:show-inheritance:
@@ -569,7 +544,7 @@
scripts.spamremove script
-------------------------
-.. automodule:: script.spamremove
+.. automodule:: scripts.spamremove
:members:
:undoc-members:
:show-inheritance:
@@ -578,7 +553,7 @@
scripts.standardize_interwiki script
------------------------------------
-.. automodule:: script.standardize_interwiki
+.. automodule:: scripts.standardize_interwiki
:members:
:undoc-members:
:show-inheritance:
@@ -587,7 +562,7 @@
scripts.states_redirect script
------------------------------
-.. automodule:: script.states_redirect
+.. automodule:: scripts.states_redirect
:members:
:undoc-members:
:show-inheritance:
@@ -596,7 +571,7 @@
scripts.surnames_redirect script
--------------------------------
-.. automodule:: script.surnames_redirect
+.. automodule:: scripts.surnames_redirect
:members:
:undoc-members:
:show-inheritance:
@@ -605,7 +580,7 @@
scripts.table2wiki script
-------------------------
-.. automodule:: script.table2wiki
+.. automodule:: scripts.table2wiki
:members:
:undoc-members:
:show-inheritance:
@@ -614,7 +589,7 @@
scripts.template script
-----------------------
-.. automodule:: script.template
+.. automodule:: scripts.template
:members:
:undoc-members:
:show-inheritance:
@@ -623,7 +598,7 @@
scripts.templatecount script
----------------------------
-.. automodule:: script.templatecount
+.. automodule:: scripts.templatecount
:members:
:undoc-members:
:show-inheritance:
@@ -632,7 +607,7 @@
scripts.touch script
--------------------
-.. automodule:: script.touch
+.. automodule:: scripts.touch
:members:
:undoc-members:
:show-inheritance:
@@ -641,7 +616,7 @@
scripts.transferbot script
--------------------------
-.. automodule:: script.transferbot
+.. automodule:: scripts.transferbot
:members:
:undoc-members:
:show-inheritance:
@@ -650,7 +625,7 @@
scripts.unlink script
---------------------
-.. automodule:: script.unlink
+.. automodule:: scripts.unlink
:members:
:undoc-members:
:show-inheritance:
@@ -659,7 +634,7 @@
scripts.unusedfiles script
--------------------------
-.. automodule:: script.unusedfiles
+.. automodule:: scripts.unusedfiles
:members:
:undoc-members:
:show-inheritance:
@@ -668,7 +643,7 @@
scripts.upload script
---------------------
-.. automodule:: script.upload
+.. automodule:: scripts.upload
:members:
:undoc-members:
:show-inheritance:
@@ -677,7 +652,7 @@
scripts.version script
----------------------
-.. automodule:: script.version
+.. automodule:: scripts.version
:members:
:undoc-members:
:show-inheritance:
@@ -686,7 +661,7 @@
scripts.watchlist script
------------------------
-.. automodule:: script.watchlist
+.. automodule:: scripts.watchlist
:members:
:undoc-members:
:show-inheritance:
@@ -695,7 +670,7 @@
scripts.weblinkchecker script
-----------------------------
-.. automodule:: script.weblinkchecker
+.. automodule:: scripts.weblinkchecker
:members:
:undoc-members:
:show-inheritance:
@@ -704,16 +679,11 @@
scripts.welcome script
----------------------
-.. automodule:: script.welcome
- :members:
- :undoc-members:
- :show-inheritance:
-
scripts.wikisourcetext script
-----------------------------
-.. automodule:: script.wikisourcetext
+.. automodule:: scripts.wikisourcetext
:members:
:undoc-members:
:show-inheritance:
\ No newline at end of file
diff --git a/scripts/catall.py b/scripts/catall.py
index ed41c91..76ffc85 100755
--- a/scripts/catall.py
+++ b/scripts/catall.py
@@ -4,9 +4,10 @@
This script shows the categories on each page and lets you change them.
For each page in the target wiki:
-* If the page contains no categories, you can specify a list of categories to
+
+- 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
+- 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:
diff --git a/scripts/claimit.py b/scripts/claimit.py
index 5741732..1f213d0 100755
--- a/scripts/claimit.py
+++ b/scripts/claimit.py
@@ -7,16 +7,12 @@
¶ms;
-------------------------------------------------------------------------------
-
Usage:
python pwb.py claimit [pagegenerators] P1 Q2 P123 Q456
You can use any typical pagegenerator (like categories) to provide with a
list of pages. Then list the property-->target pairs to add.
-
-------------------------------------------------------------------------------
For geographic coordinates:
@@ -29,8 +25,6 @@
Example:
python pwb.py claimit [pagegenerators] P625 -23.3991,-52.0910,0.0001
-
-------------------------------------------------------------------------------
By default, claimit.py does not add a claim if one with the same property
already exists on the page. To override this behavior, use the 'exists' option:
diff --git a/scripts/imagecopy.py b/scripts/imagecopy.py
index 243c7be..aa06cbb 100644
--- a/scripts/imagecopy.py
+++ b/scripts/imagecopy.py
@@ -31,43 +31,7 @@
See pagegenerators.py for more ways to get a list of images.
By default the bot works on your home wiki (set in user-config)
-Known issues/FIXMEs (no critical issues known):
-* make it use pagegenerators.py
-** Implemented in rewrite
-* Some variable names are in Spanish, which makes the code harder to read.
-** Almost all variables are now in English
-* Depending on sorting within a file category, the "next batch" is sometimes
- not working, leading to an endless loop
-** Using pagegenerators now
-* Different wikis can have different exclusion lists. A parameter for the
- exclusion list Uploadbot.localskips.txt would probably be nice.
-* Bot should probably use API instead of query.php
-** Api? Query? Wikipedia.py!
-* Should request alternative name if file name already exists on Commons
-** Implemented in rewrite
-* Exits after last file in category was processed, aborting all pending
- threads.
-** Implemented proper threading in rewrite
-* Should take user-config.py as input for project and lang variables
-** Implemented in rewrite
-* Should require a Commons user to be present in user-config.py before
- working
-* Should probably have an input field for additional categories
-* Should probably have an option to change uploadtext with file
-* required i18n options for NowCommons template (f.e. {{subst:ncd}} on
- en.wp. Currently needs customisation to work properly. Bot was tested
- succesfully on nl.wp (12k+ files copied and deleted locally) and en.wp
- (about 100 files copied and SieBot has bot approval for tagging {{ncd}}
- with this bot)
-** Implemented
-* {{NowCommons|xxx}} requires the namespace prefix Image: on most wikis
- and can be left out on others. This needs to be taken care of when
- implementing i18n
-** Implemented
-* This bot should probably get a small tutorial at meta with a few
- screenshots.
"""
-#
# Based on upload.py by:
# (C) Rob W.W. Hooft, Andre Engels 2003-2007
# (C) Wikipedian, Keichwa, Leogregianin, Rikwade, Misza13 2003-2007
diff --git a/scripts/imagecopy_self.py b/scripts/imagecopy_self.py
index b11c6b5..ab34888 100644
--- a/scripts/imagecopy_self.py
+++ b/scripts/imagecopy_self.py
@@ -10,12 +10,17 @@
Examples
-Work on a single file
- python pwb.py imagecopy.py -page:file:<filename>
-Work on all images in a category:<cat>
- python pwb.py imagecopy.py -cat:<cat>
-Work on all images which transclude a template
- python pwb.py imagecopy.py -transcludes:<template>
+Work on a single file:
+
+ python pwb.py imagecopy.py -page:file:<filename>
+
+Work on all images in a category:<cat>:
+
+ python pwb.py imagecopy.py -cat:<cat>
+
+Work on all images which transclude a template:
+
+ python pwb.py imagecopy.py -transcludes:<template>
See pagegenerators.py for more ways to get a list of images.
By default the bot works on your home wiki (set in user-config)
@@ -24,12 +29,6 @@
Use -nochecktemplate if you don't want to add the check template. Be sure to
check it yourself.
-
-Todo:
-*Queues with threads have to be implemented for the information collecting part
- and for the upload part.
-*Categories are now on a single line. Something like hotcat would be nice.
-
"""
#
# Based on upload.py by:
--
To view, visit
https://gerrit.wikimedia.org/r/370161
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idada955b724fd7629e9b81ac897eb9e2b51e4e68
Gerrit-PatchSet: 25
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>