Mercurial > hg > sv-survey-output
comparison 1/htmlize.sh @ 5:506a5fff117f tip
Switch to clickthroughs for raw data
author | Chris Cannam |
---|---|
date | Fri, 26 Apr 2013 11:49:50 +0100 |
parents | 62138033f1a8 |
children |
comparison
equal
deleted
inserted
replaced
4:1e98f771e51c | 5:506a5fff117f |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 reqd_long="iam-summary sv-platform-profession happy-summary easy-summary prog--multichoice vamp-summary" | 3 #reqd_long="iam-summary sv-platform-profession happy-summary easy-summary prog--multichoice vamp-summary" |
4 | 4 |
5 reqd_imageonly="response-count-quarterly-nonnorm iam-quarterly location-summary sv-platform-summary sv-platform-quarterly location-platform ua-summary ua-quarterly ua-platform sv-version-summary sv-version-quarterly sv-version-platform feature--multichoice feature-image-layer-respondents sv-plugs--multichoice prog-by-profession otherlang--multichoice" | 5 reqd_imageonly="response-count-quarterly-nonnorm iam-quarterly location-summary sv-platform-summary sv-platform-quarterly location-platform ua-summary ua-quarterly ua-platform sv-version-summary sv-version-quarterly sv-version-platform feature--multichoice feature-image-layer-respondents sv-plugs--multichoice prog-by-profession otherlang--multichoice" |
6 | |
7 reqd_imageonly="$reqd_imageonly iam-summary sv-platform-profession happy-summary easy-summary prog--multichoice vamp-summary" | |
6 | 8 |
7 for x in $reqd_long; do | 9 for x in $reqd_long; do |
8 pic_url="http://code.soundsoftware.ac.uk/projects/sv-survey-output/repository/raw/1/charts/formatted/$x.png" | 10 pic_url="http://code.soundsoftware.ac.uk/projects/sv-survey-output/repository/raw/1/charts/formatted/$x.png" |
9 short="$x" | 11 short="$x" |
10 case "$x" in *nonnorm) short=`echo $x|sed 's/-nonnorm//'` ;; esac | 12 case "$x" in *nonnorm) short=`echo $x|sed 's/-nonnorm//'` ;; esac |
11 cat textout/"$short".txt | sed -e 's,^,<tr><td>,' -e 's,|,</td><td>,g' -e 's,$,</td></tr>,' -e '1i<table><tr><td><img src="'$pic_url'"></td><td><table>' -e '$a</table></td></tr></table>'> html/"$x".html | 13 cat textout/"$short".txt | sed -e 's,^,<tr><td>,' -e 's,|,</td><td>,g' -e 's,$,</td></tr>,' -e '1i<table><tr><td><img src="'$pic_url'"></td><td><table>' -e '$a</table></td></tr></table>'> html/"$x".html |
12 done | 14 done |
13 | 15 |
14 for x in $reqd_imageonly; do | 16 for x in $reqd_imageonly; do |
15 pic_url="http://code.soundsoftware.ac.uk/projects/sv-survey-output/repository/raw/1/charts/formatted/$x.png" | 17 pic_url="http://code.soundsoftware.ac.uk/projects/sv-survey-output/repository/raw/1/charts/formatted/$x.png" |
16 echo '<img src="'$pic_url'">' > html/"$x".html | 18 short="$x" |
19 case "$x" in *nonnorm) short=`echo $x|sed 's/-nonnorm//'` ;; esac | |
20 text_url="http://code.soundsoftware.ac.uk/projects/sv-survey-output/repository/entry/1/textout/$short.txt" | |
21 echo '<a href="'$text_url'"><img src="'$pic_url'"></a>' > html/"$x".html | |
17 done | 22 done |
18 | 23 |