You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@incubator.apache.org by jm...@apache.org on 2021/11/18 02:24:55 UTC
svn commit: r1895133 - /incubator/public/trunk/clutch2report.py
Author: jmclean
Date: Thu Nov 18 02:24:54 2021
New Revision: 1895133
URL: http://svn.apache.org/viewvc?rev=1895133&view=rev
Log:
Added ability to generate a single podling
Modified:
incubator/public/trunk/clutch2report.py
Modified: incubator/public/trunk/clutch2report.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/clutch2report.py?rev=1895133&r1=1895132&r2=1895133&view=diff
==============================================================================
--- incubator/public/trunk/clutch2report.py (original)
+++ incubator/public/trunk/clutch2report.py Thu Nov 18 02:24:54 2021
@@ -154,6 +154,7 @@ def cliargs():
parser.add_argument('--upload', action='store_true',
help='whether to upload the report template.')
parser.add_argument('--month', type=int, help='the month to report for, defaults to current month.', default=0)
+ parser.add_argument('--podling', type=str, help='generate a template for just one podling', default=0)
return parser.parse_args() # note that this exits on errors.
def gen_shepherd_assignments(projects, month, year):
@@ -208,17 +209,24 @@ def main():
output = open('report.txt', 'w')
+ # if asked reduce to a single podling
+ if "podling" in options:
+ project = projects[options.podling]
+ projects.clear()
+ projects[options.podling] = project
+
toc = ""
for project in sorted(projects.keys()):
pdata = projects[project]
if pdata['rawReportingGroup'] == curGroup or pdata['reportingMonthly']:
toc = toc + "[" + projects[project]['fullName'] + "](#" + projects[project]['fullName'].lower() +") \n"
-
- output.write(boilerplate.format(month=calendar.month_name[month],
- last_month=calendar.month_name[last_month],
- year=year, toc=toc, shepherds=shepherds,
- timeline=timeline))
+ if "podling" not in options:
+ output.write(boilerplate.format(month=calendar.month_name[month],
+ last_month=calendar.month_name[last_month],
+ year=year, toc=toc, shepherds=shepherds,
+ timeline=timeline))
+
ptemplate = Template(perproject)
for project in sorted(projects.keys()):
@@ -231,14 +239,13 @@ def main():
mentorlist = "\n ".join(mentor_boxes)
description = textwrap.fill(pdata['description'], 76)
pdict = { 'name': pdata['fullName'],
- 'description': description,
- 'start': pdata['startDate'],
- 'mentorlist' : mentorlist}
+ 'description': description,
+ 'start': pdata['startDate'],
+ 'mentorlist' : mentorlist}
output.write(ptemplate.substitute(pdict))
# Close `Report Content` section.
- output.write("\n")
-
+ output.write("\n")
output.close()
if __name__ == "__main__":
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org