Skip to content

jasontclark/wunderwheel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

wunderwheel

wunderwheel

Version 0.0.4

wunderwheel is a Python-based command-line application that pulls weather data from Weather Underground. wunderwheel was intended to be used for piping weather information directly into other applications, specifically system-monitoring programs (ex. conky).

Compatibile with both Python2 and 3.

Description

wunderwheel requires an API key from Weather Underground: http://www.wunderground.com/weather/api. The functionality of wunderwheel does not require a paid API key, however each call of the script that does not include the -h switch will use one call to the API.

The API key should be added to $HOME/.wthrrc, along with the desired zip code and units type for the weather data:

{
	"key": "YOUR_API_KEY",
	"zip": "20004",
	"units": "imperial"
}

The above template in /wthrrc can be used to create the .wthrrc config file.

wthr.py has complete functionality of the following options:

  • --sky gives the current sky condition

  • --temperature gives the current temperature

  • --feels-like gives the current perceivable temperature

  • --forecast gives the forecast information

  • --location reports the configured location, based on the .wthrrc

The previous report-based options can be accompanied by -s, which trims the output of the reports to the raw API data from Weather Underground. The -s functionality is extremely useful for programs that process weather info.

wunderwheel also includes the -h and --help switches that provide information about the script. By default, running simply wthr.py will show print the program name.

Installation

wunderwheel can be run as-is from the command line, however it is recommended to place it in a location specified in $PATH, so it can be easily run by other programs.

To obtain the source for wunderwheel run:

git clone git://github.com/jasontclark/wunderwheel.git

Remember to edit, move and rename the /wthrrc file, adding your API key and changing the zip code/units type as desired.

If $HOME/bin/ is included in $PATH (check by running echo $PATH|grep "$HOME/bin:") it is suggested to move wunderwheel there for convenience.

To-do

  • optimize the optargs processing
  • add more data pulling functionality
  • complete coding

License(s)

This program is free software: you can redistribute it and/or modify it under the GNU General Public License, however please reference myself and/or this repository.

Data courtesy of Weather Underground, Inc. (WUI) is subject to the Weather Underground API Terms and Conditions of Use. The author of this software is not affiliated with WUI, and the software is neither sponsored nor endorsed by WUI.

About

A Pythonic CLI to the Weather Underground API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages