jenkins-bot merged this change.

View Change

Approvals: Urbanecm: Looks good to me, but someone else must approve Zhuyifei1999: Looks good to me, approved jenkins-bot: Verified
Add variable semester to archivebot

Adding variable semester to as a value to archivebot.py per user
request.

Bug: T192266
Change-Id: I7cbbedc094afe7cc6b9064b5faed7276d366b29a
---
M scripts/archivebot.py
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index 471fca9..a0e229a 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -59,6 +59,7 @@
%(year)d year of the thread being archived
%(isoyear)d ISO year of the thread being archived
%(isoweek)d ISO week number of the thread being archived
+%(semester)d semester term of the year of the thread being archived
%(quarter)d quarter of the year of the thread being archived
%(month)d month (as a number 1-12) of the thread being archived
%(monthname)s localized name of the month above
@@ -659,6 +660,8 @@
lang),
'isoweek': to_local_digits(t.timestamp.isocalendar()[1],
lang),
+ 'semester': to_local_digits(
+ int(ceil(float(t.timestamp.month) / 6)), lang),
'quarter': to_local_digits(
int(ceil(float(t.timestamp.month) / 3)), lang),
'month': to_local_digits(t.timestamp.month, lang),

To view, visit change 437250. To unsubscribe, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7cbbedc094afe7cc6b9064b5faed7276d366b29a
Gerrit-Change-Number: 437250
Gerrit-PatchSet: 4
Gerrit-Owner: Wesalius <jonas.dyba@gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Urbanecm <martin.urbanec@wikimedia.cz>
Gerrit-Reviewer: Zhuyifei1999 <zhuyifei1999@gmail.com>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444@gmail.com>
Gerrit-Reviewer: jenkins-bot <>