@@ -11,11 +11,15 @@ A weather lookup plugin for Sopel IRC bots.
1111pip install sopel-weather
1212```
1313
14- ## Configuration
14+ ## Quick Start
1515
16- You can automatically configure this plugin using ` sopel configure --plugins ` .
16+ Configure the plugin using:
1717
18- Or configure manually in ` ~/.sopel/default.cfg ` :
18+ ``` bash
19+ sopel configure --plugins
20+ ```
21+
22+ Or manually edit ` ~/.sopel/default.cfg ` :
1923
2024``` ini
2125[weather]
@@ -25,49 +29,168 @@ weather_provider = openmeteo
2529weather_api_key = dummy
2630```
2731
28- ## Usage
32+ ## Weather Providers
33+
34+ | Provider | API Key Required | Free Tier | UV Index | Features |
35+ | ----------| -----------------| -----------| ----------| ----------|
36+ | ** Open-Meteo** | No (use "dummy") | Unlimited | No | Best for basic weather, no signup needed |
37+ | ** Tomorrow.io** | Yes | 500 calls/day | Yes | Modern API, good accuracy |
38+ | ** Pirate Weather** | Yes | 20,000 calls/month | Yes | Dark Sky replacement |
39+ | ** OpenWeatherMap** | Yes | 1,000 calls/day | Yes | Popular, well-documented |
40+
41+ ### Open-Meteo (Recommended for simplicity)
42+
43+ No API key required. Use any string (e.g., "dummy") for the weather_api_key.
44+
45+ ``` ini
46+ [weather]
47+ weather_provider = openmeteo
48+ weather_api_key = dummy
49+ ```
50+
51+ - Website: https://open-meteo.com/
52+ - Free for non-commercial use
53+ - No signup required
54+
55+ ### Tomorrow.io
56+
57+ Sign up at https://www.tomorrow.io/ for a free API key.
58+
59+ ``` ini
60+ [weather]
61+ weather_provider = tomorrow
62+ weather_api_key = YOUR_TOMORROW_API_KEY
63+ ```
64+
65+ - Free tier: 500 API calls/day
66+ - Includes UV index
67+ - Modern REST API
68+
69+ ### Pirate Weather
70+
71+ Sign up at https://pirateweather.net/ for a free API key.
72+
73+ ``` ini
74+ [weather]
75+ weather_provider = pirateweather
76+ weather_api_key = YOUR_PIRATEWEATHER_API_KEY
77+ ```
78+
79+ - Free tier: 20,000 API calls/month
80+ - Drop-in Dark Sky API replacement
81+ - Includes UV index
82+
83+ ### OpenWeatherMap
84+
85+ Sign up at https://openweathermap.org/ for a free API key.
86+
87+ ``` ini
88+ [weather]
89+ weather_provider = openweathermap
90+ weather_api_key = YOUR_OPENWEATHERMAP_API_KEY
91+ ```
92+
93+ - Free tier: 1,000 API calls/day
94+ - Includes UV index
95+
96+ ## Geocoding Provider
97+
98+ A geocoding provider is required to convert location names (like "Seattle" or "90210") to coordinates.
99+
100+ ### LocationIQ (Required)
101+
102+ Sign up at https://locationiq.com/ for a free API key.
103+
104+ ``` ini
105+ [weather]
106+ geocoords_provider = locationiq_us
107+ geocoords_api_key = YOUR_LOCATIONIQ_API_KEY
108+ ```
109+
110+ Options:
111+ - ` locationiq_us ` - US-based servers (recommended for North America)
112+ - ` locationiq_eu ` - EU-based servers (recommended for Europe)
113+
114+ Free tier: 5,000 requests/day
115+
116+ ## Configuration Options
117+
118+ | Option | Description | Default |
119+ | --------| -------------| ---------|
120+ | ` geocoords_provider ` | Geocoding provider (` locationiq_us ` , ` locationiq_eu ` ) | ` locationiq_us ` |
121+ | ` geocoords_api_key ` | API key for geocoding provider | Required |
122+ | ` weather_provider ` | Weather provider (` openmeteo ` , ` tomorrow ` , ` pirateweather ` , ` openweathermap ` ) | Required |
123+ | ` weather_api_key ` | API key for weather provider | Required |
124+ | ` sunrise_sunset ` | Show sunrise/sunset times | ` False ` |
125+ | ` nick_lookup ` | Allow looking up weather by IRC nickname | ` True ` |
126+
127+ ### Example Configuration
128+
129+ ``` ini
130+ [weather]
131+ geocoords_provider = locationiq_us
132+ geocoords_api_key = pk.abc123...
133+ weather_provider = tomorrow
134+ weather_api_key = abc123xyz...
135+ sunrise_sunset = True
136+ nick_lookup = True
137+ ```
138+
139+ ## Commands
29140
30141### Current Weather
31142
32143```
33144.weather # Uses your saved location
34- .weather seattle, us
35- .weather london
145+ .weather seattle
146+ .weather Seattle, US
147+ .weather 90210
36148```
37149
38150Example output:
39151```
40- Paris, Ile-de-France, FR: 6 °C (42 °F), Clear , Humidity: 83 %, UV Index: 0 , Gentle breeze 4.0m/s (↗ )
152+ Seattle, Washington, US: 12 °C (54 °F), Partly Cloudy , Humidity: 75 %, UV Index: 2 , Gentle breeze: 19km/h (12mph) (↑ )
41153```
42154
43155### Forecast
44156
45157```
46- .forecast # Uses your saved location
47- .forecast seattle, us
48- .forecast london
158+ .forecast # Uses your saved location
159+ .forecast seattle
160+ .forecast London, UK
161+ ```
162+
163+ Example output:
164+ ```
165+ Seattle, WA, US :: Monday - Partly Cloudy - 12°C (54°F) / 5°C (41°F) :: Tuesday - Rain - 14°C (57°F) / 6°C (43°F) ...
49166```
50167
51168### Set Your Location
52169
53170```
54- .setlocation london # Set by city name
55- .setlocation 98101 # Set by US zip code
171+ .setlocation seattle
172+ .setlocation 98101
173+ .setlocation London, UK
56174```
57175
58- ## API Keys Required
176+ ## Troubleshooting
177+
178+ ### "Weather API key missing"
179+ Set ` weather_api_key ` in your configuration. For Open-Meteo, use any string like "dummy".
180+
181+ ### "GeoCoords API key missing"
182+ Sign up at https://locationiq.com/ and add your API key to ` geocoords_api_key ` .
59183
60- ### GeoCoords Provider
61- - [ LocationIQ] ( https://locationiq.com/ ) - Free tier available
184+ ### "Could not geocode location"
185+ - Check your LocationIQ API key is valid
186+ - Try a more specific location (e.g., "Seattle, WA" instead of "Seattle")
187+ - Check LocationIQ rate limits (5,000/day on free tier)
62188
63- ### Weather Providers
189+ ### "Error: Invalid API key"
190+ Verify your weather provider API key is correct and active.
64191
65- - ** Open-Meteo** - No API key required (use any string)
66- - https://open-meteo.com/
67- - ** OpenWeatherMap** - Free tier available
68- - https://openweathermap.org/
69- - ** Pirate Weather** - Drop-in Dark Sky replacement
70- - https://pirateweather.net/
192+ ### UV Index not showing
193+ UV Index is only available with Tomorrow.io, Pirate Weather, and OpenWeatherMap providers.
71194
72195## Requirements
73196
@@ -76,4 +199,4 @@ Paris, Ile-de-France, FR: 6°C (42°F), Clear, Humidity: 83%, UV Index: 0, Gentl
76199
77200## License
78201
79- MIT License
202+ Eiffel Forum License 2
0 commit comments