summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/html.py7
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