jenkins-bot submitted this change.
[IMPR] use User:MiszaBot/config as default template
Change-Id: I697a73736f21f7947b99403877d2f16fbe7f665b
---
M scripts/archivebot.py
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index 8b3100d..c2bf860 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -1,18 +1,19 @@
#!/usr/bin/python3
-"""
-archivebot.py - discussion page archiving bot.
+"""archivebot.py - discussion page archiving bot.
usage:
- python pwb.py archivebot [OPTIONS] TEMPLATE_PAGE
+ python pwb.py archivebot [OPTIONS] [TEMPLATE_PAGE]
-Bot examines backlinks (Special:WhatLinksHere) to TEMPLATE_PAGE.
-Then goes through all pages (unless a specific page specified using options)
-and archives old discussions. This is done by breaking a page into threads,
-then scanning each thread for timestamps. Threads older than a specified
-threshold are then moved to another page (the archive), which can be named
-either basing on the thread's name or then name can contain a counter which
-will be incremented when the archive reaches a certain size.
+Several TEMPLATE_PAGE templates can be given at once. Default is
+`User:MiszaBot/config`. Bot examines backlinks (Special:WhatLinksHere)
+to all TEMPLATE_PAGE templates. Then goes through all pages (unless a
+specific page specified using options) and archives old discussions.
+This is done by breaking a page into threads, then scanning each thread
+for timestamps. Threads older than a specified threshold are then moved
+to another page (the archive), which can be named either basing on the
+thread's name or then name can contain a counter which will be
+incremented when the archive reaches a certain size.
Transcluded template may contain the following parameters:
@@ -891,9 +892,9 @@
return
if not templates:
- pywikibot.bot.suggest_help(
- additional_text='No template was specified.')
- return
+ templates = ['User:MiszaBot/config']
+ pywikibot.info('No template was specified, using default {{{{{}}}}}.'
+ .format(templates[0]))
for template_name in templates:
tmpl = pywikibot.Page(site, template_name, ns=10)
To view, visit change 820889. To unsubscribe, or for help writing mail filters, visit settings.