diff options
-rwxr-xr-x | createproject.sh | 30 | ||||
-rw-r--r-- | export/styles.css | 5 | ||||
-rw-r--r-- | hemiptera_html.py | 7 | ||||
-rw-r--r-- | templates/bug.html | 4 | ||||
-rw-r--r-- | templates/buglist.html | 9 |
5 files changed, 51 insertions, 4 deletions
diff --git a/createproject.sh b/createproject.sh new file mode 100755 index 0000000..8bc4193 --- /dev/null +++ b/createproject.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +### Tool to create projects manually. + +[ -d projects ] || { echo "projects/ dir not found. Please enter the hemiptera base directory." >/dev/stderr; exit 1; } + +[ -z "$1" ] && { echo "Usage: $0 PRNAME">/dev/stderr; exit 1; } + +[ -d "projects/$1" ] && { echo "project $1 already exists. Not creating" >/dev/stderr; exit 1; } + +mkdir "projects/$1" + +while true; do + read -p "Enter name of developer, leave blank to end list > " dev + case $dev in + '') echo "Dev list written." > /dev/stderr; break;; + * ) echo "$dev" >> "projects/$1/devs.txt" ;; + esac +done +echo "Please enter a description, enter a blank line to end description:" > /dev/stderr +while true; do + read -p "> " line + case $line in + '') echo "Description written." > /dev/stderr; break;; + * ) echo "$line" >> "projects/$1/description.txt" ;; + esac +done + +echo "Project created." > /dev/stderr + diff --git a/export/styles.css b/export/styles.css index 71c36d7..33d7a15 100644 --- a/export/styles.css +++ b/export/styles.css @@ -243,3 +243,8 @@ footer { margin: 1em; padding: 1em; } + +.instr { + font-size: 0.7em; + margin-top: 1em; +} 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 ]) diff --git a/templates/bug.html b/templates/bug.html index 2173268..9bb039a 100644 --- a/templates/bug.html +++ b/templates/bug.html @@ -13,7 +13,9 @@ <h3 class="subject" > {{ replies[0]["Subject"]|e }} </h3> - Send replies to <a href="mailto:{{ bug.id }}@{{ DOMAIN }}" >{{ bug.id }}@{{ DOMAIN }}</a> or using the <a href="#ReplyForm">Form below.</a> + <div class="instr"> + Send replies to <a href="mailto:{{ bug.id }}@{{ DOMAIN }}" >{{ bug.id }}@{{ DOMAIN }}</a> or using the <a href="#ReplyForm">Form below.</a> + </div> </header> {% for i in replies %} <div class="container"> diff --git a/templates/buglist.html b/templates/buglist.html index eb16bf0..2745a8e 100644 --- a/templates/buglist.html +++ b/templates/buglist.html @@ -13,7 +13,11 @@ <h3> Bugs in {{prname}} </h3> - Report bugs by sending an e-mail to <a href="mailto:{{prname}}@{{DOMAIN}}" >{{prname}}@{{DOMAIN}}</a> or using the <a href="#ReplyForm">Form below.</a> + {% if desc != "" %} + <div class="desc"> + {{ desc }} + </div> + {% endif %} <div class="devavatars" > Developers:<br> {% for i in dev_avatars %} @@ -21,6 +25,9 @@ {% endfor %} <div class="floatbarrier"> </div> </div> + <div class="instr"> + Report bugs by sending an e-mail to <a href="mailto:{{prname}}@{{DOMAIN}}" >{{prname}}@{{DOMAIN}}</a> or using the <a href="#ReplyForm">Form below.</a> + </div> </header> <table> <thead> |