Kindle/Weather Display: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 8: Line 8:
<pre>
<pre>
#!/bin/sh
#!/bin/sh
initctl stop framework &
sleep 3
initctl stop powerd &
sleep 5


initctl stop framework
/mnt/us/scripts/weather-display.sh >/dev/nul &
initctl stop powerd
 
sleep 20
/mnt/us/scripts/weather-display.sh
</pre>
</pre>
</blockquote>
</blockquote>
Line 37: Line 38:
</blockquote>
</blockquote>


* /etc/upstart/autostart.conf
<blockquote>
<pre>
# generic autostart
start on started framework
stop on stopping framework
export LANG LC_ALL


respawn
exec sh /mnt/us/scripts/weather-init.sh
</pre>
</blockquote>




== Server ==
== Server ==
* apt-get install pngcrush librsvg2-bin
* apt-get install pngcrush librsvg2-bin

Revision as of 09:18, 19 April 2013

Based on http://www.mpetroff.net/archives/2012/09/14/kindle-weather-display/

modified for Kindle Touch 5.1.2

Kindle

  • /mnt/us/scripts/weather-init.sh
#!/bin/sh
initctl stop framework &
sleep 3
 
initctl stop powerd &
sleep 5

/mnt/us/scripts/weather-display.sh >/dev/nul &


  • /mnt/us/scripts/weather-display.sh
#!/bin/sh

cd "$(dirname "$0")"

rm weather-script-output.png
eips -c
eips -c

if wget http://server/path/to/weather-script-output.png; then
	eips -g weather-script-output.png
else
	eips -g weather-image-error.png
fi



Server

  • apt-get install pngcrush librsvg2-bin