summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile12
-rwxr-xr-xscripts/base.py7
-rwxr-xr-xscripts/myhtml.py58
3 files changed, 52 insertions, 25 deletions
diff --git a/Makefile b/Makefile
index cebd296..9689b12 100644
--- a/Makefile
+++ b/Makefile
@@ -9,18 +9,20 @@ PRODIR = $(shell find ./projects -type d)
TEAM = Core IO MM
MEMBER = BSP Geert Jacopo Kaneko Kieran Laurent Magnus Marek Morimoto Niklas Shimoda Simon Ulrich Wolfram NoAssignee
STATUS = New Active Blocked Paused Done Abandoned
-NOPARAM = menu subindex body index
+NOPARAM = subindex body index
+BSP = bsp39x
all: wiki/Chat_log.wiki .git/hooks/pre-commit
@make -s ${HTMLDIR} ${WIKIDIR}
@make -s LISTS="${MEMBER}" TARGET=finds EXP1=member EXP2=-a loop
@make -s LISTS="${STATUS}" TARGET=finds EXP1=status EXP2=-s loop
@make -s LISTS="${TEAM}" TARGET=finds EXP1=team EXP2=-t loop
+ @make -s LISTS="${BSP}" TARGET=finds EXP1=bsp EXP2="-is -b" loop
@make -s LISTS="${ALLYAML}" TARGET=file loop
@make -s LISTS="${NOPARAM}" TARGET=noparam loop
@make -s LISTS="${PROJECT}" TARGET=summary loop
@make -s LISTS="${WIKI}" TARGET=wikis loop
- @make -s bsp
+ @make -s menu
@make -s index.html
.git/hooks/pre-commit:
@@ -41,7 +43,7 @@ ${FILE}: ${HTML_OPTION2} ${HTML}
${HTML} ${HTML_OPTION1} ${HTML_OPTION2} > $@
loop:
for list in ${LISTS}; do\
- make PARAM=$${list} EXP1=${EXP1} EXP2=${EXP2} ${TARGET};\
+ make PARAM=$${list} EXP1=${EXP1} EXP2="${EXP2}" ${TARGET};\
done;
basic:
@@ -52,12 +54,12 @@ file:
make HTML_OPTION1=task HTML_OPTION2=${PARAM} FILE=$(subst yaml,html,$(subst projects,html,${PARAM})) basic
noparam:
make HTML_OPTION1=${PARAM} HTML_OPTION2="${PRODIR}" FILE=html/${PARAM}.html basic
-bsp:
- make HTML_OPTION1=bsp HTML_OPTION2="${ALLYAML}" FILE=html/bsp.html basic
finds:
make HTML_OPTION1="${EXP1} ${PARAM}" HTML_OPTION2="$(shell ${FIND} ${EXP2} ${PARAM})" FILE=html/${PARAM}.html basic
wikis:
make HTML_OPTION1=wiki HTML_OPTION2="${PARAM}" FILE=$(addprefix html/,$(subst .wiki,.html,${PARAM})) basic
+menu:
+ make HTML_OPTION1="menu ${BSP}" HTML_OPTION2="" FILE=html/menu.html basic
clean:
@rm -fr html
@rm -fr *.html
diff --git a/scripts/base.py b/scripts/base.py
index 1a6396e..7430fee 100755
--- a/scripts/base.py
+++ b/scripts/base.py
@@ -19,6 +19,7 @@ import subprocess
class base:
__top = os.path.abspath(__file__ + "/../../");
__key = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
+ __bsp = ["bsp39x"]
#--------------------
# chomp
@@ -33,6 +34,12 @@ class base:
return base.__top;
#--------------------
+ # bsp_list()
+ #--------------------
+ def bsp_list(self):
+ return base.__bsp;
+
+ #--------------------
# is_key()
#--------------------
def is_key(self, key):
diff --git a/scripts/myhtml.py b/scripts/myhtml.py
index e46b65e..2e4636a 100755
--- a/scripts/myhtml.py
+++ b/scripts/myhtml.py
@@ -332,14 +332,14 @@ class periject_html(base.base):
#--------------------
# menu_bsp
#--------------------
- def menu_bsp(self):
+ def menu_bsp(self, bsp):
html("a", {"target":"summary",
- "href":"./bsp.html"}).print("BSP patch list")
+ "href":"./{}.html".format(bsp)}).print(bsp)
#--------------------
# menu
#--------------------
- def menu(self):
+ def menu(self, argv):
self.print_css("html")
with html("body"):
@@ -360,7 +360,10 @@ class periject_html(base.base):
self.menu_team()
html("h1").print("BSP")
- self.menu_bsp()
+ with html("ul"):
+ for bsp in argv:
+ with html("li"):
+ self.menu_bsp(bsp)
html("div").print("<br><br>update<br>{}".format(
datetime.datetime.now().strftime("%Y/%m/%d %H:%M")))
@@ -492,16 +495,26 @@ class periject_html(base.base):
#--------------------
# task_commit_bsp
#--------------------
- def task_commit_bsp(self, bsp_list):
-
- cnt = 0
-
+ def print_commit_bsp(self, bsp_list):
with html("ul"):
for bsp in bsp_list:
- cnt += 1
html("li").print(html("a", {"href":self.commit_url(bsp, "bsp"),
"target":"_blank"}).text(self.git_title(bsp)))
+ return len(bsp_list)
+
+ def task_commit_bsp(self, v):
+ cnt = 0
+
+ with html("table"):
+ for b in self.bsp_list():
+ bsp_list = v.get_data(b)
+ if (not bsp_list):
+ continue
+ with html("tr"):
+ html("th").print(b)
+ with html("td"):
+ cnt += self.print_commit_bsp(bsp_list)
return cnt
#--------------------
@@ -568,19 +581,23 @@ class periject_html(base.base):
#--------------------
def task_commit(self, v):
- bsp = v.get_data("bsp-commits")
+ has_bsp = 0
+ for b in self.bsp_list():
+ if (v.get_data(b)):
+ has_bsp = 1
+ break
upstream = v.get_data("upstream")
with html("table", {"border":"1"}):
with html("tr"):
- if (bsp):
+ if (has_bsp):
html("th").print("BSP")
if (upstream):
html("th").print("upstream")
with html("tr"):
- if (bsp):
+ if (has_bsp):
with html("td"):
- self.task_commit_bsp(bsp)
+ self.task_commit_bsp(v)
if (upstream):
with html("td"):
self.task_commit_upstream(v)
@@ -667,10 +684,11 @@ class periject_html(base.base):
cnt_all = 0
cnt_done= 0
tmp = 0
+ bsp = argv.pop(0)
self.print_css("html")
with html("body"):
- html("h2").print("BSP patch list")
+ html("h2").print(bsp)
with html("table", {"border":"1"}):
with html("tr"):
@@ -682,8 +700,8 @@ class periject_html(base.base):
v = view.viewer([file])
v.set_data(file)
- bsp = v.get_data("bsp-commits")
- if (not len(bsp)):
+ bsp_list = v.get_data(bsp)
+ if (not bsp_list):
continue
cnt_all += 1
@@ -695,7 +713,7 @@ class periject_html(base.base):
v.get_data("status")))
with html("td"):
- tmp = self.task_commit_bsp(bsp)
+ tmp = self.print_commit_bsp(bsp_list)
cnt_bsp += tmp
with html("td"):
@@ -730,8 +748,8 @@ class periject_html(base.base):
# html.py body
self.body()
elif (cmd == "menu"):
- # html.py menu
- self.menu()
+ # html.py menu bsp39x
+ self.menu(sys.argv)
elif (cmd == "summary"):
# html.py summary projects/linux/io
self.summary(sys.argv)
@@ -748,7 +766,7 @@ class periject_html(base.base):
# ./script/find.py -t Core | xargs ./script/html.py status Core
self.team(sys.argv)
elif (cmd == "bsp"):
- # ./script/find.py -a | xargs ./script/html.py bsp
+ # ./script/find.py -is -b bsp39x | xargs ./script/html.py bsp bsp39x
self.bsp(sys.argv)
elif (cmd == "wiki"):
self.wiki(sys.argv)