jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1030040?usp=email )
Change subject: [IMPR] adding documentation to commons_information.py
......................................................................
[IMPR] adding documentation to commons_information.py
Adding standard documentation to commons_information.py and fixing some typos
inside
Bug: T349269
Change-Id: Ie1919407a48041c7d90856e8090078658cc9d6b4
---
M scripts/commons_information.py
1 file changed, 24 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/commons_information.py b/scripts/commons_information.py
index 8c2fe59..138f842 100755
--- a/scripts/commons_information.py
+++ b/scripts/commons_information.py
@@ -1,7 +1,25 @@
#!/usr/bin/env python3
-"""Insert a language template into the description field."""
+"""
+This bot adds a language template to the file's description field.
+
+This script understands the following command-line arguments:
+
+¶ms;
+
+Usage:
+
+ python pwb.py commons_information [pagegenerators]
+
+You can use any typical pagegenerator (like categories) to provide with a
+list of pages.
+
+Example for going through all files:
+
+ python pwb.py commons_information -start:File:!
+
+"""
#
-# (C) Pywikibot team, 2015-2023
+# (C) Pywikibot team, 2015-2024
#
# Distributed under the terms of the MIT license.
#
@@ -15,6 +33,9 @@
from pywikibot import i18n, pagegenerators
from pywikibot.bot import ExistingPageBot, SingleSiteBot
+# This is required for the text that is shown when you run this script
+# with the parameter -help or without parameters.
+docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
try:
import langdetect
@@ -52,7 +73,7 @@
@staticmethod
def detect_langs(text):
- """Detect language from griven text."""
+ """Detect language from given text."""
if langdetect is not None:
return langdetect.detect_langs(text)
return None
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1030040?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ie1919407a48041c7d90856e8090078658cc9d6b4
Gerrit-Change-Number: 1030040
Gerrit-PatchSet: 3
Gerrit-Owner: Rubin <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]