Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 14 additions and 14 deletions.
  1. +3 −3 README.markdown
  2. +4 −4 forecast7.go → forecast10.go
  3. +7 −7 wu.go
View
6 README.markdown
@@ -2,7 +2,7 @@
Wu
==========
-Version 3.7.0.
+Version 3.8.0.
_wu_ is a small, fast command-line application that retrieves weather data from [Weather Underground](http://www.wunderground.com).
@@ -24,7 +24,7 @@ wu has the following major options:
* `--forecast` gives the current (3-day) forecast.
-* `--forecast7` gives the current (7-day) forecast.
+* `--forecast10` gives the current (10-day) forecast.
* `--alerts` reports any active weather alerts.
@@ -76,7 +76,7 @@ You may find the following aliases useful:
alias conditions='wu'
alias forecast='wu -forecast'
- alias forecast7='wu -forecast7'
+ alias forecast10='wu -forecast10'
alias alerts='wu -alerts'
alias astronomy='wu -astro'
alias yesterday='wu -yesterday'
View
8 forecast7.go → forecast10.go
@@ -1,13 +1,13 @@
/*
-* forecast7.go
+* forecast10.go
*
* This file is part of wu. It contains functions related to
-* the -forecast7 switch (7-day forecast).
+* the -forecast10 switch (10-day forecast).
*
* Written and maintained by Stephen Ramsay <sramsay.unl@gmail.com>
* and Anthony Starks.
*
-* Last Modified: Sat Jan 14 09:56:48 CST 2012
+* Last Modified: Tue May 29 12:55:56 CDT 2012
*
* Copyright © 2010-2012 by Stephen Ramsay and Anthony Starks.
*
@@ -34,7 +34,7 @@ import (
// printForecast prints the forecast for a given station to standard out
// The dat structure on which it depends is in forecast.go.
-func PrintForecast7(obs *ForecastConditions, stationId string) {
+func PrintForecast10(obs *ForecastConditions, stationId string) {
t := obs.Forecast.Txt_forecast
fmt.Printf("Forecast for %s\n", stationId)
fmt.Printf("Issued at %s\n", t.Date)
View
14 wu.go
@@ -53,7 +53,7 @@ var (
doconditions bool
dolookup bool
doforecast bool
- doforecast7 bool
+ doforecast10 bool
doastro bool
doyesterday bool
dotide bool
@@ -113,7 +113,7 @@ func Options() string {
flag.BoolVar(&dolookup, "lookup", false, "Lookup the codes for the weather stations in a particular area")
flag.BoolVar(&doastro, "astro", false, "Reports sunrise, sunset, and lunar phase")
flag.BoolVar(&doforecast, "forecast", false, "Reports the current (3-day) forecast")
- flag.BoolVar(&doforecast7, "forecast7", false, "Reports the current (7-day) forecast")
+ flag.BoolVar(&doforecast10, "forecast10", false, "Reports the current (7-day) forecast")
flag.BoolVar(&doalmanac, "almanac", false, "Reports average high, low and record temperatures")
flag.BoolVar(&doyesterday, "yesterday", false, "Reports yesterday's weather data")
flag.StringVar(&dohistory, "history", "", "Reports historical data for a particular day --history=\"YYYYMMDD\"")
@@ -244,11 +244,11 @@ func weather(operation string, station string) {
jsonErr := json.Unmarshal(b, &obs)
CheckError(jsonErr)
PrintForecast(&obs, station)
- case "forecast7day":
+ case "forecast10day":
var obs ForecastConditions
jsonErr := json.Unmarshal(b, &obs)
CheckError(jsonErr)
- PrintForecast7(&obs, station)
+ PrintForecast10(&obs, station)
case "yesterday":
var obs HistoryConditions
jsonErr := json.Unmarshal(b, &obs)
@@ -282,7 +282,7 @@ func main() {
if doall {
weather("conditions", stationId)
weather("forecast", stationId)
- weather("forecast7day", stationId)
+ weather("forecast10day", stationId)
weather("alerts", stationId)
weather("almanac", stationId)
weather("history", stationId)
@@ -308,8 +308,8 @@ func main() {
if doforecast {
weather("forecast", stationId)
}
- if doforecast7 {
- weather("forecast7day", stationId)
+ if doforecast10 {
+ weather("forecast10day", stationId)
}
if dohistory != "" {
weather("history", stationId)

No commit comments for this range

Something went wrong with that request. Please try again.