Up until now, the Kindle Weather Display has looked like the above with the forecast as:
Today
Tomorrow
next day (day of the week)
day after that (day of the week)

This works wonderfully until you hit about 7pm. At 7pm the forecast flips from giving you the current day's forecast to the next day's forecast. This is because the information from NOAA being pulled is based on UTC and not a local time zone. So to eliminate any confusion in the evening, I thought it would be nice to add the name of the day of the week for the Today and Tomorrow forecasts.

The change was pretty easy. I just needed to add a few lines to the python code. in the Insert days of the week section I simply added a DAY_ONE and DAY_TWO variable. Here is what it looks like:

I'm not 100% sure that's the most efficient way to do it, but it works.

Next was to tweak the SVG file. I simply replaced Today with DAY_ONE and Tomorrow with DAY_TWO.

I also noticed the DAY_ONE day was being cut off when the actual day of the week was being inserted so I had to play around a bit with the x axis placement. I also opted for a left anchor as well which pulled the day over a little. I might play around and move it some more if it bothers me, but for now I'm happy with the placement.

Anyway, as you an see, we now have all the days of the week listed. Here's tomorrow's forecast as of 8pm tonight!

7
comments:

Awesome work. Since the "today" text can be variable in length, and I don't necessarily care where it ends (as much as where it begins), I just made the svg treat that as a start anchor. Here's the edited line of svg:

If you want to have this show current temperatures, you'll have to pull that information from NOAA instead of what the python script is currently doing - which is pulling the high and low temps for a 5 day forecast. This NOAA page should help get you to where you need to be: http://w1.weather.gov/xml/current_obs/

Next you'd probably have to increase the refresh rate of the script. I have the example set to 2 hours. If you want this to show you current temperatures, you'd have to decide at what interval you want the pi to re-run the script.

Lastly, if you're only showing the current temperature and not a forecast, you'd need to rearrange the SVG file so that it's formatted better to the information you need.