Mercurial > hg > sv-survey-output
view 1/htmlize.sh @ 2:33c6a8f9b130
Use short version for response distribution
author | Chris Cannam |
---|---|
date | Thu, 25 Apr 2013 17:27:40 +0100 |
parents | faa9b8f8906c |
children | 62138033f1a8 |
line wrap: on
line source
#!/bin/bash reqd_long="iam-summary sv-platform-profession happy-summary easy-summary prog--multichoice vamp-summary" 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" for x in $reqd_long; do pic_url="http://code.soundsoftware.ac.uk/projects/sv-survey-output/repository/raw/1/charts/raw/$x.png" short="$x" case "$x" in *nonnorm) short=`echo $x|sed 's/-nonnorm//'` ;; esac 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 done for x in $reqd_imageonly; do pic_url="http://code.soundsoftware.ac.uk/projects/sv-survey-output/repository/raw/1/charts/raw/$x.png" echo '<img src="'$pic_url'">' > html/"$x".html done