With the passing of the wxdata weather feed, several of us thought we might be able to simply parse the information directly from the https://www.yahoo.com/news/weather/ site.
NOTE: Due to changes in the Yahoo Weather Site in December 2022, this skin is no longer functional. It is unlikely I will be making any updates in the near future.
1 to 10 day display via scrolling
{Click to view animation...}
Much as the other example did, this uses a series of @Include .inc files to eliminate having to figure out regular expression or even create any measures for your skin. It does all the hard work for you!
Then you can just concentrate on the Meters in your skin. All the measures you will need are already there! Just create the meters, and use the MeasureName= options you can easily get by looking at About/Skins to see what the measure names are that are populated. I tried to make the measure names as descriptive as possible, and if you look in the include files, I have done as much commenting as I can.
If you want to "overload" an included measure, for instance to use Substitute or put an IfCondition or IfMatch on the measure, just create a copy of the measure as a Measure=String or Measure=Calc in the skin, and dynamically use the value of the original measure as a [SectionVariable].
I strongly recommend that you DON'T alter YahooComMeasures.inc.
That just reduces its usefulness as something you can just plug into another new skin, and makes is very difficult indeed for you if I update it.
YahooComVariables.inc
This is where you set your Location and Language. Read it for help.
Always @Include this file.
YahooComMeasures.inc
This parses all the JSON code and creates the measures you will need.
Always @Include this file.
YahooComLanguage.inc
This will allow you to translate the "labels" I use in my skin to any other language you want.
This is specific to this skin, and you may not need it for yours.
GeneralVariables.inc
This is where I set all the general font and color variables.
This is specific to this skin, and you may not need it for yours.
Once you @Include YahooComVariables.inc AND YahooComMeasures.inc in your skin, the following measures will be created. You can use About / Skins to see them AND the values they currently have, but here is a list for reference:
ADDENDUM; =============================================
; Location Information
; =============================================
[.LocationCity]
[.LocationCountry] United States
[.LocationLatitude]
[.LocationLongitude]
[.LocationTimeZone] This is in minutes from GMT
[.LocationTimeZoneAbbreviation] Substitution is editable
; =============================================
; Current Conditions as of the Observation Time
; =============================================
[.CurrentPressureF] Yahoo returns Imperial values
All conversions to Metric are done in the skin for temperature, pressure, distance, & speed
'TemperatureUnit' variable ('F' or 'C') control which values are displayed
Toggle desired system in the skin context menu
[.CurrentPressureC]
[.CurrentIcon]
[.CurrentObservationDate] Date formatting can be done in the variables
[.CurrentObservationTime] Time formatting can be done in the variables
[.CurrentConditions]
[.CurrentNightNarrative] Night weather forecast
[.CurrentDayNarrative] Day weather forecast
[.CurrentTemperatureF]
[.CurrentTemperatureC]
[.CurrentTemperatureHighF]
[.CurrentTemperatureHighC]
[.CurrentTemperatureLowF]
[.CurrentTemperatureLowC]
[.CurrentFeelsLikeF]
[.CurrentFeelsLikeC]
[.CurrentObservationTimeStamp]
[.CurrentHumidity]
[.CurrentPrecipitationLast24Hours]
[.CurrentUVIndex]
[.CurrentUVDescription]
[.CurrentVisibilityDistanceF]
[.CurrentVisibilityDistanceC]
[.CurrentWindSpeedF]
[.CurrentWindSpeedC]
[.CurrentWindDirectionCompass] Full ex; North West
[.CurrentWindDirectionDegrees] 0~360
[.CurrentSunriseTimeStamp]
[.CurrentSunriseTime]
[.CurrentSunSetTimeStamp]
[.CurrentSunsetTime]
[.CurrentMoonPhase] This is a number value that can reference for images and a string value of the current phase
[.CurrentDayNight] Set 'CurrentTime' variable to 'Day' or 'Night' based on time >= sunset
; ========================================
; Forecasts for today and following 10 days
; ========================================
[.ForecastTodayDayIcon]
[.ForecastTodayDayConditions]
[.ForecastTodayDayNarrative]
[.ForecastTodayNightNarrative]
[.ForecastTodayDayHighTemperatureF]
[.ForecastTodayDayHighTemperatureC]
[.ForecastTodayDayLowTemperatureF]
[.ForecastTodayDayLowTemperatureC]
[.ForecastTodayTimeStamp]
[.ForecastTodayObservationTime]
[.ForecastTodayObservationDate] Full date: Friday, April 3, 2020
[.ForecastTodayObservationDayName] Full day name: Friday
[.ForecastTodayObservationDayNameShort] Short day name: Fri
[.ForecastTodayObservationMonthName] Full month name: April
[.ForecastTodayObservationMonthNameShort] Short month name:Apr
[.ForecastTodayObservationDayOfMonth] month day: 3
[.ForecastTodayDayHumidity]
[.ForecastTodayDayPrecipitationPercent]
; ========================================
; Forecasts for Day 2
; ========================================
[.ForecastDay2Icon]
[.ForecastDay2Conditions]
[.ForecastDay2DayNarrative]
[.ForecastDay2NightNarrative]
[.ForecastDay2HighTemperatureF]
[.ForecastDay2HighTemperatureC]
[.ForecastDay2LowTemperatureF]
[.ForecastDay2LowTemperatureC]
[.ForecastDay2TimeStamp]
[.ForecastDay2ObservationTime]
[.ForecastDay2ObservationDate] Full date: Friday, April 3, 2020
[.ForecastDay2ObservationDayName] Full day name: Friday
[.ForecastDay2ObservationDayNameShort] Short day name: Fri
[.ForecastDay2ObservationMonthName] Full month name: April
[.ForecastDay2ObservationMonthNameShort] Short month name:Apr
[.ForecastDay2ObservationDayOfMonth] month day: 3
[.ForecastDay2Humidity]
[.ForecastDay2PrecipitationPercent]
...
This will follow the same pattern for Day3 through Day10
I use a period '.' to define the included measures simply because using '@' does not let the sections show in my Notepad++'s function list.
As far as I can test, Yahoo always returns Imperial values (I did not see a way to force Metric in the parse) so all conversions are done in the skin based on Imperial values being returned by the measures. The context menu offers a toggle of the values. If I missed a way to force metric values, or you are only getting Metric values returned based on your location, please let me know.
The site will automatically determine your location based on your ISP location. If you want a more precise location, go to the site, change to your location, then copy the address bar as 'URLSite={yourAddressBar}' in 'YahooComVariables.inc'.
V 1.2020.04.07
Added a variant Yahoo10.com that can show 1 to 10 days of weather (via mouse Scroll)
Added moon phase substitution as string value; still has a number value related to included images
V 1.2020.04.04c
Reverted to previous parsing scheme (thanks SilverAzide). Tested with multiple locations. Date details (long/short names of month/day, and dayofmonth) added.
My sincere apology to JSMorley for plagiarizing his post format, but it inspired me to look at parsing Yahoo the same way.