Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

derekshull

macrumors newbie
Original poster
May 7, 2012
9
0
I'm wanting two separate scripts:

1.) i want just the degree that it is outside in my city.

2.) I want the condition it is outside in my city (ex: Fair / Cloudy / Rain)

I know there's a script that gets these two together using the yahoo weather site but I want them to be separated and put in different shells.

Thanks!
 
I'm wanting two separate scripts:

1.) i want just the degree that it is outside in my city.

2.) I want the condition it is outside in my city (ex: Fair / Cloudy / Rain)

I know there's a script that gets these two together using the yahoo weather site but I want them to be separated and put in different shells.

Thanks!

Go here: http://code.google.com/p/xtacocorex-geektool-scripts/downloads/list

Download yahooweathergrabv2.py

Here are the command line arguments for the script:
Code:
Usage: yahooweathergrabv2.py [options]

Options:
  -h, --help    show this help message and exit
  -t, --temp    show the temperature only
  -d, --deg     show the degree symbol
  -c, --cond    show the condition only
  -o, --code    show the condition code
  -b, --both    show both the condition and temp
  -m, --metric  uses metric units

You can run two instances of the script, one for condition and one for temperature. The script will automatically grab your location based upon your IP address.
 
I'm new to coding whats the shell command I'd put in as an example?

Use these commands to get data:
TEMPERATURE
Code:
python /path/to/script/yahooweathergrabv2.py -t
CURRENT CONDITION
Code:
python /path/to/script/yahooweathergrabv2.py -c
CURRENT CONDITION & TEMPERATURE
Code:
python /path/to/script/yahooweathergrabv2.py -b
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.