jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/676643 )
Change subject: [doc] Add additional documentation to scripts/__init__.py ......................................................................
[doc] Add additional documentation to scripts/__init__.py
- scripts/__init__.py will be placed to the sphinx documentation inside script package description - remove empty Submodules section - shortem scripts entries
Change-Id: I8d15bbdb71e230b6e61211876026c45a842d66a0 --- M docs/scripts/scripts.rst M scripts/__init__.py 2 files changed, 121 insertions(+), 94 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/docs/scripts/scripts.rst b/docs/scripts/scripts.rst index 1fa7a03..56028be 100644 --- a/docs/scripts/scripts.rst +++ b/docs/scripts/scripts.rst @@ -13,231 +13,228 @@ scripts.maintenance scripts.userscripts
-Submodules ----------- - -scripts.add_text script ------------------------- +add_text script +----------------
.. automodule:: scripts.add_text
-scripts.archivebot script -------------------------- +archivebot script +-----------------
.. automodule:: scripts.archivebot
-scripts.basic script --------------------- +basic script +------------
.. automodule:: scripts.basic
-scripts.category script ------------------------ +category script +---------------
.. automodule:: scripts.category
-scripts.category_redirect script ---------------------------------- +category_redirect script +-------------------------
.. automodule:: scripts.category_redirect
-scripts.change_pagelang script -------------------------------- +change_pagelang script +-----------------------
.. automodule:: scripts.change_pagelang
-scripts.checkimages script --------------------------- +checkimages script +------------------
.. automodule:: scripts.checkimages
-scripts.claimit script ----------------------- +claimit script +--------------
.. automodule:: scripts.claimit
-scripts.clean_sandbox script ------------------------------ +clean_sandbox script +---------------------
.. automodule:: scripts.clean_sandbox
-scripts.commons_information script ------------------------------------ +commons_information script +---------------------------
.. automodule:: scripts.commons_information
-scripts.coordinate_import script ---------------------------------- +coordinate_import script +-------------------------
.. automodule:: scripts.coordinate_import
-scripts.cosmetic_changes script --------------------------------- +cosmetic_changes script +------------------------
.. automodule:: scripts.cosmetic_changes
-scripts.delete script ---------------------- +delete script +-------------
.. automodule:: scripts.delete
-scripts.download_dump script ------------------------------ +download_dump script +---------------------
.. automodule:: scripts.download_dump
-scripts.fixing_redirects script --------------------------------- +fixing_redirects script +------------------------
.. automodule:: scripts.fixing_redirects
-scripts.harvest_template script --------------------------------- +harvest_template script +------------------------
.. automodule:: scripts.harvest_template
-scripts.illustrate_wikidata script ------------------------------------ +illustrate_wikidata script +---------------------------
.. automodule:: scripts.illustrate_wikidata
-scripts.imagetransfer script ----------------------------- +imagetransfer script +--------------------
.. automodule:: scripts.imagetransfer
-scripts.interwiki script ------------------------- +interwiki script +----------------
.. automodule:: scripts.interwiki
-scripts.interwikidata script ----------------------------- +interwikidata script +--------------------
.. automodule:: scripts.interwikidata
-scripts.listpages script ------------------------- +listpages script +----------------
.. automodule:: scripts.listpages
-scripts.misspelling script --------------------------- +misspelling script +------------------
.. automodule:: scripts.misspelling
-scripts.movepages script ------------------------- +movepages script +----------------
.. automodule:: scripts.movepages
-scripts.newitem script ----------------------- +newitem script +--------------
.. automodule:: scripts.newitem
-scripts.noreferences script ---------------------------- +noreferences script +-------------------
.. automodule:: scripts.noreferences
-scripts.pagefromfile script ---------------------------- +pagefromfile script +-------------------
.. automodule:: scripts.pagefromfile
-scripts.parser_function_count script --------------------------------------- +parser_function_count script +------------------------------
.. automodule:: scripts.parser_function_count
-scripts.protect script ----------------------- +protect script +--------------
.. automodule:: scripts.protect
-scripts.redirect script ------------------------ +redirect script +---------------
.. automodule:: scripts.redirect
-scripts.reflinks script ------------------------ +reflinks script +---------------
.. automodule:: scripts.reflinks
-scripts.replace script ----------------------- +replace script +--------------
.. automodule:: scripts.replace
-scripts.replicate_wiki script ------------------------------- +replicate_wiki script +----------------------
.. automodule:: scripts.replicate_wiki
-scripts.revertbot script ------------------------- +revertbot script +----------------
.. automodule:: scripts.revertbot
-scripts.shell script --------------------- +shell script +------------
.. automodule:: scripts.shell
-scripts.solve_disambiguation script ------------------------------------- +solve_disambiguation script +----------------------------
.. automodule:: scripts.solve_disambiguation
-scripts.speedy_delete script ------------------------------ +speedy_delete script +---------------------
.. automodule:: scripts.speedy_delete
-scripts.template script ------------------------ +template script +---------------
.. automodule:: scripts.template
-scripts.templatecount script ----------------------------- +templatecount script +--------------------
.. automodule:: scripts.templatecount
-scripts.touch script --------------------- +touch script +------------
.. automodule:: scripts.touch
-scripts.transferbot script --------------------------- +transferbot script +------------------
.. automodule:: scripts.transferbot
-scripts.unusedfiles script --------------------------- +unusedfiles script +------------------
.. automodule:: scripts.unusedfiles
-scripts.upload script ---------------------- +upload script +-------------
.. automodule:: scripts.upload
-scripts.version script ----------------------- +version script +--------------
.. automodule:: scripts.version
-scripts.weblinkchecker script ------------------------------ +weblinkchecker script +---------------------
.. automodule:: scripts.weblinkchecker
-scripts.welcome script ----------------------- +welcome script +--------------
.. automodule:: scripts.welcome
diff --git a/scripts/__init__.py b/scripts/__init__.py index ab8c50a..0b5b23a 100644 --- a/scripts/__init__.py +++ b/scripts/__init__.py @@ -1 +1,31 @@ -"""THIS DIRECTORY IS TO HOLD BOT SCRIPTS FOR THE NEW FRAMEWORK.""" +"""**Scripts** folder contains predefined scripts easy to use. + +Scripts are only available im Pywikibot ist instaled in directory mode +and not as side package. They can be run in command line using the pwb +wrapper script:: + + python pwb.py <global options> <name_of_script> <options> + + +Every script provides a ``-help`` option which shows all available +options, their explanation and usage examples. Global optiond will be +shown by ``-help:global`` or using:: + + python pwb.py -help + +The advantages of pwb.py wrapper script are: + +- check for framework and script depedencies and show a warning if a + package is missing or outdated or if the Python release does not fit +- check whether user-config.py config file is available and ask to + create it by starting the generate_user_files.py script +- enable global options even if a script does not support them +- start private scripts located in userscripts sub-folder +- find a script even if given script name does not match a filename e.g. + due to spelling mistake +""" +# +# (C) Pywikibot team, 2021 +# +# Distributed under the terms of the MIT license. +#
pywikibot-commits@lists.wikimedia.org