From f1e914da0446f57037f23f6b04cafb558e7ccf88 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 13 Mar 2015 22:38:15 -0700 Subject: [PATCH] Weather: Update README files --- LICENSE.txt | 1 + README.md | 56 ++++++++++++++--------------------------------------- 2 files changed, 16 insertions(+), 41 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 41e9e07..83d7492 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,7 @@ The MIT License (MIT) Copyright (c) 2014 spline +Copyright (c) 2014-2015 James Lu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index f3ab61f..27d9f4d 100644 --- a/README.md +++ b/README.md @@ -2,56 +2,33 @@ # Limnoria plugin for Weather Underground (GLolol's fork) -## Introduction +## Installation -I made this plugin because quite a few Weather plugins didn't work well and WunderWeather, which uses -this API, is on their older XML api that they don't have documented anymore and, one would assume, will -be deprecated at some point. +You will need a working Limnoria bot on Python 2.7/3.2+ for this to work. -## Install - -You will need a working Limnoria bot on Python 2.7/3.4 for this to work. - -Go into your Limnoria plugin dir, usually `~/supybot/plugins` and run: +1) Go into your Limnoria plugin dir, usually `~/supybot/plugins` and run: ``` git clone https://github.com/GLolol/Supybot-Weather ``` -To install additional requirements, run: +Alternatively, you can fetch this plugin (albeit a slightly older version) via Limnoria's PluginDownloader using: `install GLolol Weather`. -``` -pip install -r requirements.txt -``` - -or if you don't have or don't want to use root, - -``` -pip install -r requirements.txt --user -``` - - -Next, load the plugin: +2) Load the plugin: ``` /msg bot load Weather ``` -[Fetch an API key for Wunderground](http://www.wunderground.com/weather/api/) by signing up (free). +3) [Fetch an API key from Wunderground](http://www.wunderground.com/weather/api/) by signing up (free). Once getting this key, you will need to set it on your bot before things will work. -Reload once you perform this operation to start using it. + ``` -/msg bot config plugins.Weather.apiKey +/msg config plugins.Weather.apiKey ``` -Now, reload the bot and you should be good to go: - -``` -/msg bot reload Weather -``` - -*Optional:* There are some config variables that can be set for the bot. They mainly control output stuff. +4) *Optional:* There are some config variables that can be set for the bot. They mainly control output stuff. ``` /msg bot config search Weather @@ -59,9 +36,12 @@ Now, reload the bot and you should be good to go: ## Example Usage +When calling the `wunderground` command, you can use zip codes (10002), cities (New York, NY), etc. Weather Underground is pretty +intelligent here. + ``` @wunderground 10002 - New York, NY :: Rain :: 52F | Visibility: 4.0mi | Saturday: Rain. High around 55F. ... + New York, NY :: Rain :: 52F | Visibility: 4.0mi | Saturday: Rain. High around 55F... ``` ## Features @@ -72,14 +52,8 @@ There are a ton of options to configure. You can find these via: /msg bot config search Weather ``` -Many of these are also available via --help when calling the wunderground command. - Users can also have their location remembered by the plugin's internal database so that -they will not have to continually type in their location. NOTE: It uses their nick only, -so if they are on a different nick, even with an identical hostmask, it will not match. - -You can use zipcodes (10002), cities (New York, NY), etc. Weather Underground is pretty -intelligent here. +they will not have to continually type in their location. ``` @setweather 10002 @@ -93,7 +67,7 @@ This now allows a user to type in the weather command w/o any arguments: Manchester, NH :: Rain :: 45F | Visibility: 10.0mi | Saturday: Occasional light rain. High 56F. ... ``` -Users can also have the bot remember their preferred options, such as using Metric when displaying weather: +Users can also have the bot remember their preferred options, such as using metric units when displaying weather: ``` @setuser metric False