Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace sun to moon if night time #115

Closed
wants to merge 6 commits into from
Closed

Replace sun to moon if night time #115

wants to merge 6 commits into from

Conversation

R11baka
Copy link
Contributor

@R11baka R11baka commented Mar 25, 2017

Resolve #68

@R11baka
Copy link
Contributor Author

R11baka commented Mar 25, 2017

@schachmat Maybe I send many commits to this PR.

@schachmat
Copy link
Owner

Heyho @R11baka,

Thanks again for your great work! There was already an attempt at this issue in PR #88, but there were still 3 points missing. You managed to tackle the first two already. I'd be happy to merge your PR if you handle the last one as well, adding night-alternative icons for every condition code where a sun is visible currently. It would be a little inconsistent if you have a moon displayed in the CodeClear condition at night, but if the next night has the CodePartlyCloudy there would still be a sun hiding behind clouds. ;)

@schachmat
Copy link
Owner

Oh and an implementation hint.

Just copy the codes := map[iface.WeatherCode][]string map and name the existing one codesDay and the new one codesNight. You should be able to assign the existing images for cases where there is no sun/moon displayed like iface.CodeCloudy: codesDay[iface.CodeCloudy],

@schachmat schachmat added this to the 3.0 milestone Mar 25, 2017
@R11baka
Copy link
Contributor Author

R11baka commented Mar 31, 2017

@schachmat If I understand correctly, I should replace codeSunny, partly rainly,partly cloudly,partly light rain ?

@schachmat
Copy link
Owner

@R11baka,

There is a sun visible in:

  • CodeHeavyShowers
  • CodeHeavySnowShowers
  • CodeLightShowers
  • CodeLightSleetShowers
  • CodeLightSnowShowers
  • CodePartlyCloudy
  • CodeSunny (renamed to CodeClear in your PR)
  • CodeThunderyShowers
  • CodeThunderySnowShowers

They might seem like a lot, but since the sun is clipped equally in most of them, replacing the sun with a moon should not be too hard.

@R11baka
Copy link
Contributor Author

R11baka commented Apr 8, 2017

Hi @schachmat . Created new pull request
#117

@R11baka R11baka closed this Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

night ascii should be a moon instedof a sun
2 participants