feat(#3): Geolocation auto + favorites system #10

Merged
ti-paul merged 1 commit from feature/3-geoloc-favorites into main 2026-06-12 09:08:47 +00:00
Member

Closes #3

New: src/geoloc.js

  • IP geolocation with 30-min cache
  • Favorites CRUD with JSON persistence
  • Montreal fallback
  • 3 new CLI flags: --fav-add, --fav-remove, --fav-list

16 tests. 103 total pass.

Closes #3 ## New: src/geoloc.js - IP geolocation with 30-min cache - Favorites CRUD with JSON persistence - Montreal fallback - 3 new CLI flags: --fav-add, --fav-remove, --fav-list 16 tests. **103 total pass.**
feat(#3): Geolocation auto + favorites system
Some checks failed
CI / test (pull_request) Failing after 0s
8ff87b3f3c
New module src/geoloc.js:
- geolocateIP: IP-based geolocation via ipify + ip-api
- geolocateWithCache: 30-min cache for geo results
- resolveCity: auto-geo with Montreal fallback
- addFavorite/removeFavorite/listFavorites: JSON persistence
- renderFavorites: ASCII display
- Config stored in ~/.config/cli-weather-art/

CLI integration:
- --geolocate/-g: improved auto-detection
- --fav-add <city>: add to favorites
- --fav-remove <city>: remove from favorites
- --fav-list: list saved favorites

16 new tests. All 103 tests pass. Closes #3.
ti-paul left a comment
No description provided.
16 tests, 103 total. Geoloc + favorites + cache. LGTM.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
les_clankeurs/cli-weather-art!10
No description provided.