jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/702920 )
Change subject: [doc] Add settings to sphinx doc ......................................................................
[doc] Add settings to sphinx doc
Keep ACCOUNT SETTINGS together
Change-Id: I26fceeb90a543654acc108f3f31c77225d537e96 --- A docs/api_ref/pywikibot.config.rst M docs/api_ref/pywikibot.rst M pywikibot/config.py 3 files changed, 130 insertions(+), 6 deletions(-)
Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
diff --git a/docs/api_ref/pywikibot.config.rst b/docs/api_ref/pywikibot.config.rst new file mode 100644 index 0000000..290636c --- /dev/null +++ b/docs/api_ref/pywikibot.config.rst @@ -0,0 +1,124 @@ +pywikibot.config module +----------------------- + +API reference +^^^^^^^^^^^^^ + +.. automodule:: pywikibot.config + :noindex: + +Option setting +^^^^^^^^^^^^^^ + + +Account Settings +++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# ACCOUNT SETTINGS + :end-before: # ############# + +User Interface Settings ++++++++++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# USER INTERFACE SETTINGS + :end-before: # ############# + +External Editor Settings +++++++++++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# EXTERNAL EDITOR SETTINGS + :end-before: # ############# + +Logfile Settings +++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# LOGFILE SETTINGS + :end-before: # ############# + +External Script Path Settings ++++++++++++++++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# EXTERNAL SCRIPT PATH SETTINGS + :end-before: # ############# + +External Families Settings +++++++++++++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# EXTERNAL FAMILIES SETTINGS + :end-before: # ############# + +Interwiki Settings +++++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# INTERWIKI SETTINGS + :end-before: # ############# + +Solve Disambiguations Settings +++++++++++++++++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# SOLVE_DISAMBIGUATION SETTINGS + :end-before: # ############# + +Image Related Settings +++++++++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# IMAGE RELATED SETTINGS + :end-before: # ############# + +Settings to Avoid Server Overload ++++++++++++++++++++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# SETTINGS TO AVOID SERVER OVERLOAD + :end-before: # ############# + +Weblink Checker Settings +++++++++++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# WEBLINK CHECKER SETTINGS + :end-before: # ############# + +Database Settings ++++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# DATABASE SETTINGS + :end-before: # ############# + +Http Settings ++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# HTTP SETTINGS + :end-before: # ############# + +Cosmetic Changes Settings ++++++++++++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# COSMETIC CHANGES SETTINGS + :end-before: # ############# + +Replication Bot Settings +++++++++++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# REPLICATION BOT SETTINGS + :end-before: # ############# + +Further Settings +++++++++++++++++ + +.. literalinclude:: ../../pywikibot/config.py + :start-at: # ############# FURTHER SETTINGS + :end-before: # ============= diff --git a/docs/api_ref/pywikibot.rst b/docs/api_ref/pywikibot.rst index bbfec20..58aa3b6 100644 --- a/docs/api_ref/pywikibot.rst +++ b/docs/api_ref/pywikibot.rst @@ -35,10 +35,7 @@
.. automodule:: pywikibot.bot_choice
-pywikibot.config module ------------------------ - -.. automodule:: pywikibot.config +.. include:: pywikibot.config.rst
pywikibot.cosmetic_changes module ---------------------------------- diff --git a/pywikibot/config.py b/pywikibot/config.py index 2304599..426f39d 100644 --- a/pywikibot/config.py +++ b/pywikibot/config.py @@ -273,6 +273,11 @@ # not just MediaWiki API calls. extra_headers = {}
+# Set to True to override the {{bots}} exclusion protocol (at your own risk!) +ignore_bot_templates = False + +# ############################################# +
def user_home_path(path): """Return a file path to a file in the user home.""" @@ -438,8 +443,6 @@ # ‘families/’ is a subdirectory of the directory in which config.py is found. register_families_folder(os.path.join(os.path.dirname(__file__), 'families'))
-# Set to True to override the {{bots}} exclusion protocol (at your own risk!) -ignore_bot_templates = False
# ############# USER INTERFACE SETTINGS ##############
pywikibot-commits@lists.wikimedia.org