diff options
-rw-r--r-- | Makefile | 11 | ||||
-rwxr-xr-x | scripts/html.py | 35 |
2 files changed, 45 insertions, 1 deletions
@@ -2,11 +2,12 @@ CMD = ./scripts/html.py ALLYAML = $(shell ./scripts/find.py -a) FOLDERS = $(subst ./,,$(shell cd ./projects; find -type d)) DST = $(subst yaml,html,$(subst projects,html,${SRC})) +TEAM = Core IO MM MEMBER = BSP Geert Jacopo Kaneko Kieran Laurent Magnus Marek Morimoto Niklas Shimoda Simon Ulrich Wolfram STATUS = New Active Blocked Paused Done Abandoned SPF = menu subindex body -all: summary spf files index.html members statuss html/bsp.html +all: summary spf files index.html members statuss teams html/bsp.html summary: @for folder in ${FOLDERS}; do\ @@ -55,6 +56,14 @@ statuss: status: @make -s SRC="$(shell ./scripts/find.py -s ${STA})" DST=./html/${STA}.html TGT="status ${STA}" ./html/${STA}.html +teams: + @for team in ${TEAM}; do\ + make -s TM=$${team} team;\ + done; + +team: + @make -s SRC="$(shell ./scripts/find.py -t ${TM})" DST=./html/${TM}.html TGT="team ${TM}" ./html/${TM}.html + ${DST}: ${SRC} ${CMD} @echo "${DST}" ${CMD} ${TGT} ${SRC} > $@ diff --git a/scripts/html.py b/scripts/html.py index cdc77c9..11f573f 100755 --- a/scripts/html.py +++ b/scripts/html.py @@ -172,6 +172,7 @@ class periject_html(base.base): with html("table", {"border":"1"}): with html("tr"): html("th").print("file") + html("th").print("team") html("th").print("assignee") html("th").print("title") for file in files: @@ -184,6 +185,10 @@ class periject_html(base.base): subbody.option({"href":self.relpath_y2h(file, dir)}) html("td").print(subbody.text(os.path.basename(file).replace(".yaml", ""))) + team = v.get_data("team") + summary.option({"href":self.relpath("html/{}.html".format(team), dir)}) + html("td").print(summary.text(team)) + assignee = v.get_data("assignee") summary.option({"href":self.relpath("html/{}.html".format(assignee), dir)}) html("td").print(summary.text(assignee)) @@ -289,6 +294,16 @@ class periject_html(base.base): "href":"./{}.html".format(status)}).text(status)) #-------------------- + # menu_team + #-------------------- + def menu_team(self): + # from project.schema.yaml + with html("ul"): + for status in ['Core', 'IO', 'MM']: + html("li").print(html("a", {"target":"summary", + "href":"./{}.html".format(status)}).text(status)) + + #-------------------- # menu_bsp #-------------------- def menu_bsp(self): @@ -311,6 +326,9 @@ class periject_html(base.base): html("h1").print("Status") self.menu_status() + html("h1").print("Team") + self.menu_team() + html("h1").print("BSP") self.menu_bsp() @@ -328,11 +346,13 @@ class periject_html(base.base): dir = os.path.dirname(v.file) assignee = v.get_data("assignee") status = v.get_data("status") + team = v.get_data("team") with html("table", {"border":"1"}): with html("tr"): html("th").print("file") html("th").print("status") + html("th").print("team") html("th").print("assignee") html("th").print("key") @@ -341,6 +361,8 @@ class periject_html(base.base): html("td").print(html("a", {"target":"summary", "href":self.relpath("html/{}.html".format(status), dir)}).text(status)) html("td").print(html("a", {"target":"summary", + "href":self.relpath("html/{}.html".format(team), dir)}).text(team)) + html("td").print(html("a", {"target":"summary", "href":self.relpath("html/{}.html".format(assignee), dir)}).text(assignee)) html("td").print(v.get_data("key")) @@ -510,6 +532,16 @@ class periject_html(base.base): self.__summary(None, "{}/html".format(self.top()), argv) #-------------------- + # team + #-------------------- + def team(self, argv): + + team = argv.pop(0) + + with html("body"): + self.__summary(team, "{}/html".format(self.top()), argv) + + #-------------------- # bsp #-------------------- def bsp(self, argv): @@ -581,6 +613,9 @@ class periject_html(base.base): elif (cmd == "status"): # ./script/find.py -s Active | xargs ./script/html.py status Active self.status(sys.argv) + elif (cmd == "team"): + # ./script/find.py -t Core | xargs ./script/html.py status Core + self.team(sys.argv) elif (cmd == "bsp"): # ./script/html.py bsp xxx.yaml xxx.yaml ... self.bsp(sys.argv) |