diff options
author | Mike Beattie <mike@ethernal.org> | 2012-03-21 21:25:01 +1300 |
---|---|---|
committer | Mike Beattie <mike@ethernal.org> | 2012-03-21 21:25:01 +1300 |
commit | 972ef9cbaddfaf49b404199509db6dfd71f68338 (patch) | |
tree | f204e9cc562f85d2e9080d6d3fc86bc416659a71 /encode_html.sh | |
parent | 13d22c5d2ab2fdb15d268ce75e8a9c35d6781944 (diff) |
Add html and html generation script.
Signed-off-by: Mike Beattie <mike@ethernal.org>
Diffstat (limited to 'encode_html.sh')
-rwxr-xr-x | encode_html.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/encode_html.sh b/encode_html.sh new file mode 100755 index 0000000..26f6677 --- /dev/null +++ b/encode_html.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# Copy HTML to a web server.... +scp index.html prometheus.ethernal.org:public_html/arduino.html + +# Fetch HTML with appropriate Accept-Encoding: header -> save to raw file +echo -ne "GET /~mjb/arduino.html HTTP/1.0\nAccept-Encoding: gzip\n\n" | nc www.ethernal.org 80 > index_gzip.raw + +# Process Raw file - delete headers and blank line -> save to raw gzip dat file +sed -e '0,/^\r$/d' index_gzip.raw > index_gzip.dat + +# Process raw gzip dat file into hex array for inclusion in program +od -A n -t x1 index_gzip.dat | sed -e 's/ \(..\)/0x\1, /g' -e 's/^/ /' > index_gzip.txt + +ls -l index_gzip.* + |