summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-02-09 11:53:09 +0900
committerKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-02-09 11:53:09 +0900
commitd6e3aa98e2a4966a14b7331f31fd0798863550e1 (patch)
treebf8abe9b68afb4120fdc98a080e54f361f2661a6
parentb372cf17db0b15d2c85cc03423309e59b085c0c8 (diff)
scripts: add html_member/status/team/bsp.py
Because current PeriJect is using scripts/myhtml.py to creating all HTML files, all files will be re-created if myhtml.py itself was updated. It is very verbose. This patch separates "member", "status", "team", "bsp" from it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-rw-r--r--Makefile4
-rwxr-xr-xscripts/html_bsp.py86
-rwxr-xr-xscripts/html_member.py39
-rwxr-xr-xscripts/html_status.py40
-rwxr-xr-xscripts/html_team.py40
5 files changed, 207 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 917a707..a065b33 100644
--- a/Makefile
+++ b/Makefile
@@ -69,12 +69,12 @@ noparam:
make CMD=${PARAM} HTML=html/${PARAM}.html myhtml
menu:
make CMD=menu OPTION="${BSP}" HTML=html/menu.html myhtml
+finds:
+ make CMD=${EXP1} OPTION=${PARAM} FILES="$(shell ${FIND} ${EXP2} ${PARAM})" HTML=html/${PARAM}.html myhtml
basic:
make HTML_OPTION1="${HTML_OPTION1}" HTML_OPTION2="${HTML_OPTION2}" FILE=${FILE} ${FILE}
-finds:
- make HTML_OPTION1="${EXP1} ${PARAM}" HTML_OPTION2="$(shell ${FIND} ${EXP2} ${PARAM})" FILE=html/${PARAM}.html basic
clean:
@rm -fr html
@rm -fr *.html
diff --git a/scripts/html_bsp.py b/scripts/html_bsp.py
new file mode 100755
index 0000000..321706e
--- /dev/null
+++ b/scripts/html_bsp.py
@@ -0,0 +1,86 @@
+#! /usr/bin/env python3
+#===============================
+#
+# html_bsp
+#
+# 2021/02/09 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+#===============================
+import sys
+import os
+
+import view
+import html_base
+from html_base import html
+#====================================
+#
+# periject_html
+#
+#====================================
+class periject_html(html_base.myhtml):
+
+ #--------------------
+ # print
+ #--------------------
+ def print(self, argv):
+ # remove this script
+ argv.pop(0)
+
+ a = html("a", {"target":"subbody"})
+ cnt_bsp = 0
+ cnt_up = 0
+ cnt_upd = 0
+ cnt_all = 0
+ cnt_done= 0
+ tmp = 0
+ bsp = argv.pop(0)
+
+ self.print_css("html")
+ with html("body"):
+ html("h2").print(bsp)
+
+ with html("table", {"border":"1"}):
+ with html("tr"):
+ html("th").print("file")
+ html("th").print("BSP")
+ html("th").print("upstream")
+
+ for file in argv:
+ v = view.viewer([file])
+ v.set_data(file)
+
+ bsp_list = v.get_data(bsp)
+ if (not bsp_list):
+ continue
+
+ cnt_all += 1
+ with html("tr"):
+ a.option({"href":
+ self.relpath_y2h(file, "{}/html".format(self.top()))})
+ html("th").print("{}<br>({})".format(
+ a.text(os.path.basename(file).replace(".yaml", "")),
+ v.get_data("status")))
+
+ with html("td"):
+ tmp = self.print_commit_bsp(bsp_list)
+ cnt_bsp += tmp
+
+ with html("td"):
+ (done, cnt) = self.task_commit_upstream(v)
+ if (cnt):
+ cnt_up += tmp
+ if (done):
+ cnt_done += 1
+ cnt_upd += tmp
+
+ html("p").print("bsp:{}/upstream:{} = {:.1f}%".format(cnt_bsp, cnt_up, cnt_up * 100 /cnt_bsp))
+ html("p").print("task:{}/done:{} = {:.1f}% (bsp:{}/upstream:{} = {:.1f}%)".format(cnt_all, cnt_done, cnt_done * 100 /cnt_all,
+ cnt_bsp, cnt_upd, cnt_upd * 100 /cnt_bsp))
+
+#====================================
+#
+# As command
+#
+#====================================
+if __name__=='__main__':
+ # ./script/find.py -is -b bsp39x | xargs ./script/html_bsp.py bsp39x
+ periject_html().print(sys.argv)
diff --git a/scripts/html_member.py b/scripts/html_member.py
new file mode 100755
index 0000000..e5efba6
--- /dev/null
+++ b/scripts/html_member.py
@@ -0,0 +1,39 @@
+#! /usr/bin/env python3
+#===============================
+#
+# html_member
+#
+# 2021/02/09 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+#===============================
+import sys
+
+import html_base
+from html_base import html
+#====================================
+#
+# periject_html
+#
+#====================================
+class periject_html(html_base.myhtml):
+
+ #--------------------
+ # print
+ #--------------------
+ def print(self, argv):
+ # remove this script
+ argv.pop(0)
+ mem = argv.pop(0)
+ dir = "{}/html".format(self.top())
+
+ self.print_css(dir)
+ with html("body"):
+ self.summary(mem, dir, argv)
+
+#====================================
+#
+# As command
+#
+#====================================
+if __name__=='__main__':
+ # ./script/find.py -a Wolfram | xargs ./script/html_member.py Wolfram
+ periject_html().print(sys.argv)
diff --git a/scripts/html_status.py b/scripts/html_status.py
new file mode 100755
index 0000000..e8a9bea
--- /dev/null
+++ b/scripts/html_status.py
@@ -0,0 +1,40 @@
+#! /usr/bin/env python3
+#===============================
+#
+# html_status
+#
+# 2021/02/09 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+#===============================
+import sys
+
+import html_base
+from html_base import html
+#====================================
+#
+# periject_html
+#
+#====================================
+class periject_html(html_base.myhtml):
+
+ #--------------------
+ # print
+ #--------------------
+ def print(self, argv):
+ # remove this script
+ argv.pop(0)
+ argv.pop(0)
+
+ dir = "{}/html".format(self.top())
+
+ self.print_css(dir)
+ with html("body"):
+ self.summary(None, dir, argv)
+
+#====================================
+#
+# As command
+#
+#====================================
+if __name__=='__main__':
+ # ./script/find.py -s Active | xargs ./script/html_status.py Active
+ periject_html().print(sys.argv)
diff --git a/scripts/html_team.py b/scripts/html_team.py
new file mode 100755
index 0000000..51458ab
--- /dev/null
+++ b/scripts/html_team.py
@@ -0,0 +1,40 @@
+#! /usr/bin/env python3
+#===============================
+#
+# html_team
+#
+# 2021/02/09 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+#===============================
+import sys
+
+import html_base
+from html_base import html
+#====================================
+#
+# periject_html
+#
+#====================================
+class periject_html(html_base.myhtml):
+
+ #--------------------
+ # print
+ #--------------------
+ def print(self, argv):
+ # remove this script
+ argv.pop(0)
+
+ team = argv.pop(0)
+ dir = "{}/html".format(self.top())
+
+ self.print_css(dir)
+ with html("body"):
+ self.summary(team, dir, argv)
+
+#====================================
+#
+# As command
+#
+#====================================
+if __name__=='__main__':
+ # ./script/find.py -t Core | xargs ./script/html_team.py Core
+ periject_html().print(sys.argv)