erikflowers / weather-icons

215 Weather Themed Icons and CSS
https://github.com/erikflowers/weather-icons
6.9k stars 851 forks source link

Mappings for yr.no #140

Closed Grayda closed 1 year ago

Grayda commented 8 years ago

Could we please get mappings in for yr.no's weather API? I'm happy to do it myself, I just need to sit down and work out how.

The API page for their weather codes (which can be used to display their icons) are located here: http://api.yr.no/weatherapi/weathericon/1.1/documentation

Thanks :)

erikflowers commented 8 years ago

I am not actively adding things to the project right now, but if you want to contribute it that is great. Please try and copy the other mappings I have and create them in Less so they can be part of the build.

Grayda commented 8 years ago

Thanks Erik. I took a look last night and it seems straight forward. Just so I don't miss anything, I think I just need to:

And that's it? Nothing to minify or otherwise fiddle with?

erikflowers commented 8 years ago

Actually yeah. 

The sass and less then all need to be compiled down to their single source CSS. But as the project is not documented for anyone but me to do the final compile, if you do the less/sass then I can retrieve it and compile it down to the CSS and then update the repository. 

At some point, I need to take on a partner here (if anyone was even interested) or see if someone wants to be the new owner of Weather Icons. Or, figure out how to update it more than twice a year. 

On February 10, 2016 at 2:06:37 PM, David Gray (notifications@github.com) wrote:

Thanks Erik. I took a look last night and it seems straight forward. Just so I don't miss anything, I think I just need to:

Copy and modify an existing mapping in both the less and sass folders Rename my mapping to something like wi-yrno.less / wi-yrno.scss @import my mapping in the relevant weather-icons.less / weather-icons.scss file And that's it? Nothing to minify or otherwise fiddle with?

— Reply to this email directly or view it on GitHub.

Grayda commented 8 years ago

Thanks Erik. I just made a PR with the yr.no mappings. I've tested it in my app and it works well, but because I don't have a Sass compiler handy (just LESS), I might leave the compilation up to you, if that's alright.

erikflowers commented 8 years ago

Thanks I will check it out. I use https://incident57.com/codekit/ for everything compilewise. 

On February 10, 2016 at 8:50:25 PM, David Gray (notifications@github.com) wrote:

Thanks Erik. I just made a PR with the yr.no mappings. I've tested it in my app and it works well, but because I don't have a Sass compiler handy (just LESS), I might leave the compilation up to you, if that's alright.

— Reply to this email directly or view it on GitHub.

dosjos commented 7 years ago

Hi I was on the verge of starting to make this mapping myself, but you have already done it. I couldnt find it in the less folder, so I guess it isn't merget yet. Is there a way I could get my hands on the mapping?

Grayda commented 7 years ago

@dosjos You can get the mapping from here: https://github.com/Auroras-live/weather-icons/blob/master/less/mappings/wi-yrno.less. It needs to be compiled before use though, as I was leaving final compilation up to Erik

dosjos commented 7 years ago

Thanks, must have missed it when I looked. @erikflowers could you do us the favour and compile it?

Grayda commented 7 years ago

@dosjos If you want to compile it yourself, and you have access to node.js, you can do:

npm install -g lessc

And then you can compile it by going in to the less folder in the weather-icons folder and running

lessc weather-icons.less

And it should throw out a CSS file with the yr.no mappings included.

I've also compiled it and placed it here: https://gist.github.com/Grayda/4a58ad3f489acdf2e787e3fd71a2e4b8

But there's no minified version, as I'm using it in a mobile app and fiddling with minification wasn't worth the effort. Just download that file and place it in the weather-icons/css folder, overwriting the old one, then just use the icons as you normally would.

Oh, and if you're after a set of PHP "mappings", check out my other repo which acts as a really simple bridge between PHP and weather-icons' unicode points. Just thought I'd chuck that in there :)

fox91 commented 1 year ago

I close this considering that it has been updated in #260.