feat: add nighttime rendering and improve place disambiguation#6
Closed
Ninjona wants to merge 1 commit intoVG-dev1:mainfrom
Closed
feat: add nighttime rendering and improve place disambiguation#6Ninjona wants to merge 1 commit intoVG-dev1:mainfrom
Ninjona wants to merge 1 commit intoVG-dev1:mainfrom
Conversation
- Add night/day detection with Open-Meteo is_day field - Implement clear-night animation with twinkling stars - Add moon icon display for nighttime clear skies - Fix weather classification to use weather codes instead of text parsing - Improve geocoding with fallback queries for ambiguous place names - Add weighted disambiguation scoring for location candidates - Implement Wikipedia search fallback for better image resolution - Apply night tint to all weather conditions during nighttime - Preserve query fallback priority order for accurate disambiguation
Owner
|
Thank you so much for a massive PR! That's awesome! I’m really excited about your changes. They address a lot of issues and add great improvements. The timing is a bit tricky, though: I have some local features I’ve been working on that I haven’t committed yet. Because of that, I need to carefully integrate your PR with my local changes to make sure everything works together. I just wanted to give you a heads-up in case I take a little extra time to make sure everything is fully compatible. Thanks again for the huge contribution, I really appreciate it! |
Owner
|
I've baked everything together into one commit I just pushed to my branch, so I can't merge your PR. I'm closing it. But again, thank you so much for your amazing contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses three major enhancements to weathery:
Changes
Feature 1: Nighttime Support
Files Modified:
src/animate.rs,src/weather.rs,src/main.rsis_night: boolflag toWeatherDataby parsing Open-Meteo'sis_dayfieldanimate_clear_night()function that renders twinkling stars on dark backgroundsnight_tint()color filter to all weather animations during nighttimeUser Benefit:
Feature 2: Place Disambiguation & Resolution
Files Modified:
src/weather.rs,src/image_fetch.rs,src/main.rsGeocoding Improvements:
count=1) to top 10 candidates (count=10)HashSetdeduplicationGeoResultdeserialize to capturename,admin1,country,populationfieldsformat_location_name()to generate canonical display namesImage Resolution Improvements:
get_city_image_url()Feature 3: Weather Code Integration & Day/Night Icons
Files Modified:
src/animate.rs,src/main.rs,src/weather.rsweather_code: u32field intoWeatherDatastruct for direct accessweather_from_code()function mapping codes to animation types:RainSnowThunderstormClearweather_description()day/night aware:Weather::from_str()parserUser Benefit:
This PR adds:
Lines Changed:
src/weather.rs: +121/-18 (net +103)src/animate.rs: +130/-12 (net +118)src/image_fetch.rs: +32/-8 (net +24)src/main.rs: +16/-6 (net +10)Testing Checklist
weathery "Rochester, NY"– resolves correctly