Weather Logging In Tinderbox Updated
For the past couple of years, I’ve used a “Stamp” in Tinderbox to append weather conditions to the current note’s text.
See Recording The Weather In Tinderbox for background.
While preparing my Daybook for 2017 I decided I wanted to include just the current condition and temperature rather than the entire weather summary. The following script grabs the weather (using wu) and returns either just the current conditions and temperature or, if a date is passed, it returns summary information for that date.
|
|
My Stamp calls this new script, adds the results to a custom attribute named “Weather” and then adds Weather as a KeyAttribute to the current note. This way the weather is only displayed on notes for which I explicitly asked for it. The new Stamp looks like this:
Now, if I want to include the weather conditions with a note, I apply the “Get Weather on $StartDate” Stamp and it looks like this…
Note that this gets the weather on the date set in the $StartDate attribute for a note. It could easily use the $Created attribute instead but I always set $StartDate explicitly so that’s what I use.
If I only want the current conditions, I use the “Get Weather Conditions” Stamp instead. It’s basically the same thing, but without including a date parameter. The results look like this…