thanks! I'll give the template map a try. On Tuesday, November 10, 2020 at 2:39:14 PM UTC-8 [email protected] wrote:
> Off the top of my head, I can think of three ways to do this. Needless to > say, none of them is tested. > > 1. It's not very elegant, but you could monkey patch ValueHelper. See this > email > exchange > <https://groups.google.com/g/weewx-user/c/IKkVo4TIcfw/m/sxCt4OiNCAAJ>. > > 2 Alternatively, you can write a search list extension dedicated to doing > what you want. It would look like: > > <p>The current wind direction is $long_ordinal($current.windDir.raw> </p> > > 3. Use a map in your template to map from the abbreviated ordinals, to the > long version: > > #set ord_map = {'N': 'North', 'NNE': 'North Northeast', ... } > > <p>The current wind direction is > $ord_map[$current.windDir.ordinal_compass]</p> > > > > > -tk > > On Tue, Nov 10, 2020 at 2:02 PM Chris Alemany <[email protected]> wrote: > >> Hello all, >> >> Is it possible to be able to add a full word version of the >> ordinal_compass formatting for wind directions? This would be useful for >> cerating auto-generated scripts and readouts, especially if they are read >> by machine, like an Alexa skill. Currently the Ordinates section controls >> this in skin.conf and I could replace the abbreviations with words, but >> that would change it for all directions in that skin which would not be >> desirable. I’m currently implementing this in a custom RSS/XML file in the >> RSS directory of the Standard skin. >> >> It would be wonderful if we could have two separate formats for ordinals: >> >> eg. >> >> [[Ordinates]] >> # The ordinal directions. The last one should be for no wind >> direction >> directions = N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, >> W, WNW, NW, NNW, N/A >> >> [[OrdinatesLong]] >> # The ordinal directions. The last one should be for no wind >> direction >> directions = North, North Northeast, Northeast, East Northeast, >> East, East Southeast, Southeast, South Southeast, South, South Southwest, >> Southwest, West Southwest, West, West Northwest, Northwest, North >> Northwest, N/A >> >> I’m working on the Alexa Skill/Flash Briefing for my website (you can >> search for it at Port Alberni Weather in the Alexa Skill store) and so >> having this functionality available would be an asset. >> >> If I have missed this ability elsewhere please forgive me. >> I indebted to your advice! >> >> Thanks >> Chris >> >> -- >> You received this message because you are subscribed to the Google Groups >> "weewx-user" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/23049B5D-C896-40CE-AC60-47D92AD9EB5C%40gmail.com >> . >> > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/366ba70d-4772-4e00-bb95-e21535b5db43n%40googlegroups.com.
