Kindle/Weather Display: Difference between revisions
< Kindle
(→Kindle) |
(→Kindle) |
||
Line 22: | Line 22: | ||
<pre> | <pre> | ||
#!/bin/sh | #!/bin/sh | ||
# | |||
# This script will reload the display only is source png file changed | |||
# log data is going to /tmp/weather-display | |||
while : | while : |
Revision as of 09:21, 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 # # This script will reload the display only is source png file changed # log data is going to /tmp/weather-display while : do rm weather-image.png if wget -q http://host/weather/kindle/weather-image.png then if [ ! -e weather-current.png ] then cp weather-image.png weather-current.png fi if [ "$(cat weather-image.png | md5sum)" != "$(cat weather-current.png | md5sum)" ] then echo $(date -Iseconds) "|" new file >> /tmp/weather-display rm weather-current.png cp weather-image.png weather-current.png eips -c eips -c eips -f -g weather-current.png else echo $(date -Iseconds) "|" no changes >> /tmp/weather-display #eips -g weather-current.png fi else echo $(date -Iseconds) "|" error >> /tmp/weather-display eips -g weather-image-error.png fi #echo $(date -Iseconds) "|" screen written >> /tmp/weather-display sleep 300 done
Server
- apt-get install pngcrush librsvg2-bin