From a286236b7dc147b5b403c74a19fa8ec17662a5cb Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 9 Feb 2021 11:33:38 +0900 Subject: scripts: add html_index/body/subindex.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 "index", "body", "subindex" from it. Signed-off-by: Kuninori Morimoto --- Makefile | 5 ++--- scripts/html_body.py | 31 +++++++++++++++++++++++++++++++ scripts/html_index.py | 34 ++++++++++++++++++++++++++++++++++ scripts/html_subindex.py | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 103 insertions(+), 3 deletions(-) create mode 100755 scripts/html_body.py create mode 100755 scripts/html_index.py create mode 100755 scripts/html_subindex.py diff --git a/Makefile b/Makefile index 36fb89b..3e41a9c 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,6 @@ PROJECT = $(subst ./,,$(shell cd ./projects; find -type d)) WIKI = $(shell ls wiki/*.wiki) WIKIDIR = html/wiki HTMLDIR = $(addprefix html/, ${PROJECT}) -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 @@ -66,11 +65,11 @@ summary: make CMD=summary FILES=projects/${PARAM} HTML=html/${PARAM}/summary.html myhtml wikis: make CMD=wiki FILES="${PARAM}" HTML=$(addprefix html/,$(subst .wiki,.html,${PARAM})) myhtml +noparam: + make CMD=${PARAM} HTML=html/${PARAM}.html myhtml basic: make HTML_OPTION1="${HTML_OPTION1}" HTML_OPTION2="${HTML_OPTION2}" FILE=${FILE} ${FILE} -noparam: - make HTML_OPTION1=${PARAM} HTML_OPTION2="${PRODIR}" FILE=html/${PARAM}.html basic finds: make HTML_OPTION1="${EXP1} ${PARAM}" HTML_OPTION2="$(shell ${FIND} ${EXP2} ${PARAM})" FILE=html/${PARAM}.html basic menu: diff --git a/scripts/html_body.py b/scripts/html_body.py new file mode 100755 index 0000000..3ca1de2 --- /dev/null +++ b/scripts/html_body.py @@ -0,0 +1,31 @@ +#! /usr/bin/env python3 +#=============================== +# +# html_body +# +# 2021/02/09 Kuninori Morimoto +#=============================== +import html_base +from html_base import html +#==================================== +# +# periject_html +# +#==================================== +class periject_html(html_base.myhtml): + + #-------------------- + # print + #-------------------- + def print(self): + self.print_css("html") + with html("body"): + html("div").print("select tasks from menu") + +#==================================== +# +# As command +# +#==================================== +if __name__=='__main__': + periject_html().print() diff --git a/scripts/html_index.py b/scripts/html_index.py new file mode 100755 index 0000000..50415ca --- /dev/null +++ b/scripts/html_index.py @@ -0,0 +1,34 @@ +#! /usr/bin/env python3 +#=============================== +# +# html_index +# +# 2021/02/09 Kuninori Morimoto +#=============================== +import html_base +from html_base import html +#==================================== +# +# periject_html +# +#==================================== +class periject_html(html_base.myhtml): + + #-------------------- + # print + #-------------------- + def print(self): + # | | | + # |menu|body| + # | | | + with html("frameset", {"cols":"{},*".format(self.config("html-default-cols"))}): + html("frame", {"src":"./html/menu.html", "name":"menu"}).print() + html("frame", {"src":"./html/subindex.html", "name":"body"}).print() + +#==================================== +# +# As command +# +#==================================== +if __name__=='__main__': + periject_html().print() diff --git a/scripts/html_subindex.py b/scripts/html_subindex.py new file mode 100755 index 0000000..2452b2e --- /dev/null +++ b/scripts/html_subindex.py @@ -0,0 +1,36 @@ +#! /usr/bin/env python3 +#=============================== +# +# html_subindex +# +# 2021/02/09 Kuninori Morimoto +#=============================== +import html_base +from html_base import html +#==================================== +# +# periject_html +# +#==================================== +class periject_html(html_base.myhtml): + + #-------------------- + # print + #-------------------- + def print(self): + # ------- + # summary + # ------- + # body + # ------- + with html("frameset", {"rows":"{},*".format(self.config("html-default-rows"))}): + html("frame", {"src":"./summary.html", "name":"summary"}).print() + html("frame", {"src":"./body.html", "name":"subbody"}).print() + +#==================================== +# +# As command +# +#==================================== +if __name__=='__main__': + periject_html().print() -- cgit v1.2.3