summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--god/claws/rcontrol.c2
-rw-r--r--retiolum/hosts/cd12
-rw-r--r--retiolum/hosts/kheurop12
-rw-r--r--retiolum/hosts/terrapi11
-rwxr-xr-xutil/bin/make-realwallpaper199
-rwxr-xr-xutil/lib/naturalvoices/att.sh3
6 files changed, 237 insertions, 2 deletions
diff --git a/god/claws/rcontrol.c b/god/claws/rcontrol.c
index 972c97d0..eaa66b89 100644
--- a/god/claws/rcontrol.c
+++ b/god/claws/rcontrol.c
@@ -61,7 +61,7 @@ void exit_gracefully(struct ftdi_context* ftdic, char exit_code);
int main(int argc, char **argv)
{
int ret=0, int_argument=0, option_flags=0, long_index=0, i=0, num_ops=0;
- char c=0;
+ signed char c=0;
unsigned char buf[COMMANDO_LENGTH], char_argument=0, operation=0;
const char* ft_serial=DEFAULT_FT_SERIAL;
double double_argument;
diff --git a/retiolum/hosts/cd b/retiolum/hosts/cd
new file mode 100644
index 00000000..3cdd9c0e
--- /dev/null
+++ b/retiolum/hosts/cd
@@ -0,0 +1,12 @@
+Address = 162.219.5.183
+Subnet = 10.243.113.222
+Subnet = 42:4522:25f8:36bb:8ccb:0150:231a:2af3
+
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAob/6umTaEa8jtU79nYzHa6vyEjFtg3ATh7uTvafmE0b2845Tf2hC
+IpSBw//FOnkq2sUvj9IymMnMFBcPq6VZisvXq2B25BJZn16X8PJmkXptCckDoqVj
+qRjg/H4q8aryp74dGYDp4ibBKyhN/BP3N5DXH4vkj4A8qHuekJWQD7wWcXj6Jcx5
+otDsj5LZYh0J8LJOXQYxmcadrZoLnkL6s3SkWbgexkJ2l5bhYSVBOEtjKQ8Eq1k3
+Iyao+iyaffUEhcaiwRBXovt77B8RYYY2DjKKVuR4LCxIbB7NKF03tETjensLBw2t
+9sV7J5zBGDGbDIOliGBfRABBBlopgaOAsQIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/kheurop b/retiolum/hosts/kheurop
new file mode 100644
index 00000000..bbe93fe0
--- /dev/null
+++ b/retiolum/hosts/kheurop
@@ -0,0 +1,12 @@
+Address = 91.250.101.180
+Subnet = 10.243.78.78
+Subnet = 42:bcd9:7340:9628:9604:7068:5061:4976
+
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAqIFB0Nk2eSg/K/dJGOEegtezhn5P1RUi1ZgxoZoTR6K4T/tSbD2u
+gjPU53mhRN622lLayMMXtWVKdhO4IUu3mKfemA/8/fy7Qu9T51UUS+NXu/4g5X3W
+Jg2a37TrnQUrsqNud7QQhPTGF8L0+UT2mHlfRYggtAO1J2pSWtsqDiMAOD+89zvg
+Gta8aMdaFPhdkfboaHH6mVJBFOkrjQJE4RiUzwZS24PKh6gRJV4cENdcNRYdVwhv
+dOM+SWzPZXDTAVyG6HptvSdfDUKi4hJY4yS+TIf9j7yR0YpUie3CsbN4a9jP2KVt
+/NhzZ9nNaEv6O8Nk+7Zu8OaxUPgctEFYfQIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/terrapi b/retiolum/hosts/terrapi
new file mode 100644
index 00000000..cf1748eb
--- /dev/null
+++ b/retiolum/hosts/terrapi
@@ -0,0 +1,11 @@
+Subnet = 10.243.30.159
+Subnet = 42:b0bd:090e:2a37:2cb4:3314:58e7:20d1
+
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAtVhVDRBzq0L6JtdVUVEakBzhMP2RjOj7cHZnEUsXzl1TXxuOBhL1
+XOXd3LUuU0jNMMvzxO2VU7K/wM6lX30B6ryqDSfsXKEBM60BiGVzb4Kd+7No76RN
+0NsoLygtvtOm1SmvvT1UCsjomoIE4eGdBDsfQzNKt2PUoh/0rTZBHd6qGJuCZQSX
+F4IRby4jzYvjOsaSi7GVadvhoyETVxbUAi9VquxOltytA+Ud4CXPb/JW25uVmQQK
+RXhoWahWJGJ2WJLGnT1RkTvFQk0zM3XJfPBVItnKCYHuE5HMU/5nnnPvKWiICdsA
+1NNU8+kXtK3IJEHwfpRWe/isMj8rROU37wIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/util/bin/make-realwallpaper b/util/bin/make-realwallpaper
new file mode 100755
index 00000000..a195b5f1
--- /dev/null
+++ b/util/bin/make-realwallpaper
@@ -0,0 +1,199 @@
+#!/bin/sh
+set -euf
+
+###### USAGE #####
+#run in new directory(will be polluted with images
+#just run ./make-realwallpaper
+
+main() {
+ # fetch source images in parallel
+ #fetch nightmap-old-raw.jpg \
+ # http://awka.sourceforge.net/Night_le_huge.jpg &
+ fetch nightmap-raw.jpg \
+ http://www.zeitnews.org/sites/default/files/users/20/article_slideshow_images/nasa-noaa-satellite-reveals-new-views-earth-night-1354814354_0.jpg &
+ fetch daymap-raw.png \
+ http://www.nnvl.noaa.gov/images/globaldata/SnowIceCover_Daily.png &
+ fetch clouds-raw.jpg \
+ http://user.chol.com/~winxplanet/cloud_data/clouds_2048.jpg &
+ fetch krebs.sat.tle \
+ http://www.celestrak.com/NORAD/elements/stations.txt
+ wait
+
+ #check_type nightmap-old-raw.jpg image
+ check_type nightmap-raw.jpg image
+ check_type daymap-raw.png image
+ check_type clouds-raw.jpg image
+
+ in_size=1466x1200
+ out_geometry=1366x768+100+160
+
+ nightsnow_color='#0c1a49' # nightmap
+ #nightsnow_color='#0a3b5c' # nightmap-old
+
+ # normalize *-raw.* to *.png
+ #nightmap-old-raw.jpg
+ for raw in \
+ nightmap-raw.jpg \
+ daymap-raw.png \
+ clouds-raw.jpg \
+ ;
+ do
+ normal=${raw%-raw.*}.png
+ needs_rebuild $normal $raw || continue
+ echo "make $normal; normalize $raw" >&2
+ convert $raw -scale $in_size $normal
+ done
+
+ # create nightmap-fullsnow
+ needs_rebuild nightmap-fullsnow.png \
+ && convert -size $in_size xc:$nightsnow_color nightmap-fullsnow.png
+
+ # extract daymap-snowmask from daymap-final
+ needs_rebuild daymap-snowmask.png \
+ daymap.png \
+ && convert daymap.png -threshold 95% daymap-snowmask.png
+
+ # extract nightmap-lightmask from nightmap
+ needs_rebuild nightmap-lightmask.png \
+ nightmap.png \
+ && convert nightmap.png -threshold 25% nightmap-lightmask.png
+
+ # create layers
+ make_layer nightmap-snowlayer.png nightmap-fullsnow.png daymap-snowmask.png
+ make_layer nightmap-lightlayer.png nightmap.png nightmap-lightmask.png
+
+ # apply layers
+ flatten nightmap-lightsnowlayer.png \
+ nightmap-lightlayer.png \
+ nightmap-snowlayer.png
+
+ flatten nightmap-final.png \
+ nightmap-lightsnowlayer.png \
+ nightmap.png
+ # nightmap-old.png
+
+ # make all unmodified files as final
+ for normal in \
+ daymap.png \
+ clouds.png \
+ ;
+ do
+ final=${normal%.png}-final.png
+ needs_rebuild $final &&
+ ln $normal $final
+ done
+
+ # create xplanet output
+ cat >xplanet.config <<EOF
+[earth]
+"Earth"
+map=daymap-final.png
+night_map=nightmap-final.png
+cloud_map=clouds-final.png
+cloud_threshold=10
+shade=15
+EOF
+
+ # create xplanet output satellite version
+ cat >xplanet-sat.config <<EOF
+[earth]
+"Earth"
+map=daymap-final.png
+night_map=nightmap-final.png
+cloud_map=clouds-final.png
+satellite_file=krebs.sat
+cloud_threshold=10
+shade=15
+EOF
+
+ needs_rebuild krebs.sat \
+ && cat >krebs.sat <<EOF
+25544 "ISS" Image=none trail={orbit,-2,2,1} color=grey thickness=1 fontsize=10
+37820 "T1" Image=none trail={orbit,-2,2,1} color=grey thickness=1 fontsize=10
+39175 "ATV-4" Image=none trail={orbit,-2,2,1} color=grey thickness=1 fontsize=10
+39258 "CYG" Image=none trail={orbit,-2,2,1} color=grey thickness=1 fontsize=10
+EOF
+
+ needs_rebuild krebs.mar \
+ && cat >krebs.mar <<EOF
+EOF
+
+ # rebuild every time to update shadow
+ xplanet --num_times 1 --geometry $in_size \
+ --output xplanet-output.png --projection merc -config xplanet.config
+
+ # rebuild everytime satellite version
+ xplanet --num_times 1 --geometry $in_size \
+ --output xplanet-sat-output.png --projection merc -config xplanet-sat.config
+
+ # trim xplanet output
+ needs_rebuild realwallpaper.png \
+ xplanet-output.png \
+ && convert xplanet-output.png -crop $out_geometry realwallpaper.png
+
+ # trim xplanet-sat output
+ needs_rebuild realwallpaper-sat.png \
+ xplanet-sat-output.png \
+ && convert xplanet-sat-output.png -crop $out_geometry realwallpaper-sat.png
+}
+
+# usage: getimg FILENAME URL
+fetch() {
+ echo "fetch $1"
+ curl -sS -z "$1" -o "$1" "$2"
+}
+
+# usage: check_type FILENAME TYPE
+check_type() {
+ if ! file -ib "$1" | grep -q "^$2/"; then
+ echo "$1 is not of type $2" >&2
+ rm "$1"
+ return 1
+ fi
+}
+
+# usage: image_size FILENAME
+image_size() {
+ identify "$1" | awk '{print$3}'
+}
+
+# usage: make_mask DST SRC MASK
+make_layer() {
+ if needs_rebuild "$@"; then
+ echo "make $1 (apply mask)" >&2
+ convert "$2" "$3" -alpha off -compose copy_opacity -composite "$1"
+ fi
+}
+
+# usage: flatten DST HILAYER LOLAYER
+flatten() {
+ if needs_rebuild "$@"; then
+ echo "make $1 (flatten)" >&2
+ composite "$2" "$3" "$1"
+ fi
+}
+
+# usage: needs_rebuild DST SRC...
+needs_rebuild() {
+ a="$1"
+ shift
+ if ! test -e "$a"; then
+ #echo " $a does not exist" >&2
+ result=0
+ else
+ result=1
+ for b; do
+ if test "$b" -nt "$a"; then
+ #echo " $b is newer than $a" >&2
+ result=0
+ fi
+ done
+ fi
+ #case $result in
+ # 0) echo "$a needs rebuild" >&2;;
+ #esac
+ return $result
+}
+
+
+main "$@"
diff --git a/util/lib/naturalvoices/att.sh b/util/lib/naturalvoices/att.sh
index 892e0bc0..3ec903c5 100755
--- a/util/lib/naturalvoices/att.sh
+++ b/util/lib/naturalvoices/att.sh
@@ -14,7 +14,8 @@ get_tts(){
: ${OUTFILE?please provide OUTFILE}
text=$(echo $* | sed -e "s/ /+/g" -e "s/\//%2F/g")
voice="${voice:-klara}"
- ip="192.20.225.36"
+ # TODO grab this url from the tts demo page
+ ip="204.178.9.51"
base_url="http://$ip"
curl -sS $base_url$( curl -Ss -H "Host:$ip" \
-H "Origin:http://www2.research.att.com" \