summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README44
1 files changed, 44 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..1c706ac
--- /dev/null
+++ b/README
@@ -0,0 +1,44 @@
+# Weather - a simple tool to look up weather forecasts
+
+Weather is far faster than any browser based forecast request;
+the weather websites nowadays are so full of surveillance
+that each forecast takes around 650KB for Met Office or
+8MB for BBC. Much better to just make a single request for the
+forecast data in JSON format and display it, which is what this
+tool does.
+
+Weather currently requires a location ID for the location to look
+up. The defaults are hardcoded at the top of weather.go (bbcdefid
+and metdefid), and I encourage you to set them to your own home
+location. Otherwise, you can set the location ID with an argument
+to the program.
+
+## Finding your location ID
+
+The Met Office and BBC weather providers each use different IDs,
+but each are easy to discover.
+
+For the BBC, go to the forecast page for your location and the
+ID is the final part of the page URL, for example 2653266 is the
+location ID for Chelmsford, which has this page on the BBC website:
+https://www.bbc.com/weather/2653266. You could also look it up with
+their JSON location service, using the 'containerId' field from a
+request like this:
+https://open.live.bbc.co.uk/locator/locations?s=chelmsford&format=json
+
+For the Met Office, look up your location and use the ID from the
+'nearestSspaId' field from this URL, substituting "Chelmsford"
+for the location you want:
+https://www.metoffice.gov.uk/plain-rest-services/location-search/Chelmsford/?max=5
+
+## Notes
+
+It only makes one HTTPS request to a provider's json, using the
+same URL structures that they use on their websites.
+
+Weather doesn't use any API keys or anything silly like that,
+instead relying on the URLs the organisations use with their own
+Javascript.
+
+The Met Office unfortunately forbids requests through tor, but BBC
+allow them.