#!/bin/bash today=$(date "+/wxlog/%Y/%m/%Y-%m-%d.txt") rtoday=$(date "+/wxlog/%Y/%m/rain/%Y-%m-%d-rain.txt") echo "Welcome to the perilo.us weather station." echo "" echo "This mini weather station is a Raspberry Pi connected to a BME280 sensor" echo "dangling from the eaves of my house in Hernando, MS, USA." echo "" echo "╔════════════════════════════════════════════════════════════════════╗" echo "║ *** Current Weather *** ║▒" echo "╚════════════════════════════════════════════════════════════════════╝▒" echo " ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒" echo "" echo "╔══════════════╗ ╔══════════════╗ ╔══════════════╗ ╔══════════════╗" sudo python3 /var/gopher/scripts/current_weather.py echo "╚══════════════╝▒ ╚══════════════╝▒ ╚══════════════╝▒ ╚══════════════╝▒" echo " ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒" echo "" echo "╔════════════════════════════════╗ ╔════════════════════════════════╗" sudo /var/gopher/scripts/hilow_rain.py /var/gopher$today echo "╚════════════════════════════════╝▒ ╚════════════════════════════════╝▒" echo " ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒" echo "" echo " *** Daily Temperature Plot ***" /var/gopher/plot/plot.py /var/gopher$today gnuplot -e "set terminal dumb; set xdata time; set timefmt '"%H:%M"'; plot '/tmp/temp.tsv' using 1:2 w l title ''" >> /tmp/plot.txt sed -i '1d' /tmp/plot.txt sed -i 's/\(.\{2\}\)//' /tmp/plot.txt cat /tmp/plot.txt rm /tmp/plot.txt rm /tmp/temp.tsv echo "----------------------------------------------------------------------------" echo "" echo "[0|Today's Log|$today|server|port]" echo "" echo "[0|Today's Rain Log|$rtoday|server|port]" echo "" echo "[1|Weather Logs|/wxlog|server|port]" echo "" echo "[1|Dew Point Comfort Index|/dpindex.gph|server|port]" echo "" echo "----------------------------------------------------------------------------" echo "" echo "Powered by Geomyidae" echo "[1|Geomyidae Git|/scm/geomyidae/log.gph|bitreich.org|70]"