summaryrefslogtreecommitdiff
path: root/hemiptera_html.py
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-07-31 17:33:45 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-07-31 17:33:45 +0200
commite3f24f6437d928df13517c8c6ff010204d2f65f9 (patch)
tree85fa28c917ee4759e73a911681dc682f53ee56d7 /hemiptera_html.py
parentbf9072e5a34cc3ab14b704fbef1fa4bb5dc14829 (diff)
downloadhemiptera-e3f24f6437d928df13517c8c6ff010204d2f65f9.tar.gz
hemiptera-e3f24f6437d928df13517c8c6ff010204d2f65f9.tar.bz2
hemiptera-e3f24f6437d928df13517c8c6ff010204d2f65f9.zip
added ability to create project descriptions.
Diffstat (limited to 'hemiptera_html.py')
-rw-r--r--hemiptera_html.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/hemiptera_html.py b/hemiptera_html.py
index 39146e7..fa0bb75 100644
--- a/hemiptera_html.py
+++ b/hemiptera_html.py
@@ -54,7 +54,10 @@ def create_project_list() :
for i in os.listdir(opj(basedir, "projects")) :
k = Project()
k.name = i
-
+ k.desc = ""
+ if os.path.exists(opj(basedir, "projects", i, "description.txt")) :
+ k.desc = open(opj(basedir, "projects", i, "description.txt"), "r").read()
+
projects.append(k)
bugs =[]
k.bugs = bugs
@@ -99,7 +102,7 @@ def create_project_list() :
bugs.sort(key=lambda b: int(b.id), reverse=True)
bugs.sort(key=lambda b: int(b.closed))
f = open(opj(export, i, "index.html"), "w")
- f.write(buglist.render(DOMAIN=DOMAIN, bugs=bugs, prname=i, dev_avatars=dev_avatars))
+ f.write(buglist.render(DOMAIN=DOMAIN, bugs=bugs, prname=i, dev_avatars=dev_avatars, desc=k.desc))
f.close()
k.count = len(k.bugs)
k.opencount = len([ i for i in k.bugs if not i.closed ])