diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-02-26 11:39:59 +0900 |
---|---|---|
committer | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-04-09 14:59:46 +0900 |
commit | 90d3882d2c8b3c3a02b798ba9d5aaaff1186868a (patch) | |
tree | 14698740df4a511fcf2b1cdf1c212ed3884e5ab3 /scripts | |
parent | 251b79bf79514c7a0c8826dee6c144684ae9c313 (diff) |
html: add relpath_y2h()
more simply link path
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/html.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/html.py b/scripts/html.py index 724b1d8..d7e4890 100755 --- a/scripts/html.py +++ b/scripts/html.py @@ -118,6 +118,9 @@ class periject_html(base.base): super().__init__() self.git = self.config("git-linux") + def relpath_y2h(self, file, frm): + return os.path.relpath(file.replace("yaml", "html").replace("projects", "html"), frm) + def git_title(self, id): return self.run("git -C {} log -1 {} --format=%s".format(self.git, id)) @@ -176,7 +179,7 @@ class periject_html(base.base): subbody = html("a", {"target":"subbody"}) summary = html("a", {"target":"summary"}) with html("tr"): - subbody.option({"href":os.path.relpath(file.replace("yaml", "html").replace("projects", "html"), dir)}) + subbody.option({"href":self.relpath_y2h(file, dir)}) html("td").print(subbody.text(os.path.basename(file).replace(".yaml", ""))) status = v.get_data("status") @@ -308,7 +311,7 @@ class periject_html(base.base): with html("tr"): html("td").print(item) html("td").print(html("a", {"href": - os.path.relpath(related_file.replace("projects", "html").replace("yaml", "html"), current_dir)}).text(rv.get_data("title"))) + self.relpath_y2h(related_file, current_dir)}).text(rv.get_data("title"))) #-------------------- # task_relation |