Skip to content

Instantly share code, notes, and snippets.

@x2q
Created March 1, 2013 17:17
Show Gist options
  • Save x2q/5066199 to your computer and use it in GitHub Desktop.
Save x2q/5066199 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Simple bash script to mail weather data from pywws to DMI Borgervejr
#
# Requirements:
# - Use the DMI Borgervejr template:
# https://github.com/x2q/pywws/blob/master/code/example_templates/dmi_borgervejr.txt
# - Configure pywws to output to /tmp/dmi.txt
# - Configure ssmtp for outbound mails
/bin/cat /tmp/dmi.txt | /usr/sbin/ssmtp borgervejr@dmi.dk
exit 0
[config]
ws type = 3080
logdata sync = 0
day end hour = 21
rain day threshold = 0.2
[live]
services = []
twitter = []
plot = []
text = ['dmi.txt']
[paths]
work = /tmp/weather
templates = /home/pi/weather/templates/
graph_templates = /root/weather/graph_templates/
[ftp]
local site = True
secure = False
site = ftp.username.your_isp.co.uk
user = username
password = secret
directory = /tmp/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment