summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/html.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/html.py b/scripts/html.py
index d7e4890..80842cc 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(self, path, frm):
+ return os.path.relpath("{}/{}".format(self.top(), path), frm)
+
def relpath_y2h(self, file, frm):
return os.path.relpath(file.replace("yaml", "html").replace("projects", "html"), frm)
@@ -183,11 +186,11 @@ class periject_html(base.base):
html("td").print(subbody.text(os.path.basename(file).replace(".yaml", "")))
status = v.get_data("status")
- summary.option({"href":os.path.relpath("{}/html/{}.html".format(self.top(), status), dir)})
+ summary.option({"href":self.relpath("html/{}.html".format(status), dir)})
html("td").print(summary.text(status))
assignee = v.get_data("assignee")
- summary.option({"href":os.path.relpath("{}/html/{}.html".format(self.top(), assignee), dir)})
+ summary.option({"href":self.relpath("html/{}.html".format(assignee), dir)})
html("td").print(summary.text(assignee))
html("td").print(v.get_data("title"))
@@ -287,9 +290,9 @@ class periject_html(base.base):
with html("tr"):
html("td").print(os.path.relpath(v.file, self.top()))
html("td").print(html("a", {"target":"summary",
- "href":os.path.relpath("{}/html/{}.html".format(self.top(), status), dir)}).text(status))
+ "href":self.relpath("html/{}.html".format(status), dir)}).text(status))
html("td").print(html("a", {"target":"summary",
- "href":os.path.relpath("{}/html/{}.html".format(self.top(), assignee), dir)}).text(assignee))
+ "href":self.relpath("html/{}.html".format(assignee), dir)}).text(assignee))
html("td").print(v.get_data("key"))
#--------------------