An example of OS X automation and the enduring power of simplification. Instead of "an app for that", a few lines of script. App for that developers come and go, core scripts endure.
Problem:
Not enough time in the day to keep up with lake conditions and fishing reports from Missouri and surrounding states delivered on the Web.
Fishing is all about having fun. Catching is all about discovering patterns.
Solution:
A daily or weekly "curl" to relevant sites with the information pulled down to local storage.
Two core web download technologies, curl and wget , ship with OS X. Pick your poison, write a few lines of script, enjoy the benefits years into the future.
Using curl (the line was split for readability, all one line at the cli)..
curl www.nwk.usace.army.mil/pt/daily.cfm -o
/Users/dougb/Downloads/automatic/MO/pomme
/daily/pomme_$(date +\%Y\%m\%d\%H).html
With multiple lines similar to above in a shell script, peruse more web locations.
In my case, I wanted daily information for lake Pomme de Terre, weekly updates on other lakes. Scripts, composed of multiple lines like the curl call above, are saved as "weeklyfr" and "pommedaily".
To automate the shell script into an applescript that may then be called from iCal, a new applescript named daily-lake-info.scpt.
Applescripts may be run with an entry in iCal as an alarm for a recurring event.
The sole action of the applescript "daily-lake-info.scpt" is running the pommedaily shell script.
The daily-lake-info script runs daily at 5:15 pm.
The weeklyfr works the same but only runs on Fridays at 5pm.
do shell script "pommedaily"
It is an easy way to survive operating system upgrades without any changes to your designed workflows. Keeping it simple ruggedizes the task into the future. This workflow was designed in 2008 at about os X version 10.5. With updates for web sites moving around, it still works great today.
More Pictures:
First, the file structure. Then a view of a file pulled from the archives.
Did you know pomme is French for Apple?
