Weather Script Debugged
Added one more Icon Attributed Icons in readme.md changed folder structure
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
BIN
examples/graphics/climacons/cloudy.png
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
10
examples/graphics/climacons/readme.md
Normal file
@ -0,0 +1,10 @@
|
||||
= Climacons by Adam Whitcroft
|
||||
|
||||
75 climatically categorised pictographs for web and UI design by [@adamwhitcroft](http://www.twitter.com/#!/adamwhitcroft).
|
||||
|
||||
Visit the [Climacons](http://adamwhitcroft.com/climacons/) website for more information.
|
||||
|
||||
Visit [Adam Whitcroft on GitHub](https://github.com/AdamWhitcroft)
|
||||
|
||||
== License
|
||||
You are free to use any of the Climacons Icons (the "icons") in any personal or commercial work without obligation of payment (monetary or otherwise) or attribution, however a credit for the work would be appreciated. **Do not** redistribute or sell and **do not** claim creative credit. Intellectual property rights are not transferred with the download of the icons.
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
@ -34,7 +34,7 @@ LONG = "114.189945" # Your Location
|
||||
|
||||
def forecast_icon(idx):
|
||||
icon = data['daily']['data'][idx]['icon']
|
||||
image = "/graphics/" + icon + ".png"
|
||||
image = "/graphics/climacons/" + icon + ".png"
|
||||
return image
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ def icon():
|
||||
deg = ' C' # Degree symbol on thermal printer, need to find a better way to use a proper degree symbol
|
||||
|
||||
# if you want Fahrenheit change units= to 'us'
|
||||
url = "https://api.darksky.net/forecast/"+API_KEY+"/"+LAT+","+LONG+"?exclude=[alerts,minutely,hourly,flags]&units=si"
|
||||
url = "https://api.darksky.net/forecast/"+API_KEY+"/"+LAT+","+LONG+"?exclude=[alerts,minutely,hourly,flags]&units=si" #change last bit to 'us' for Fahrenheit
|
||||
response = urllib.urlopen(url)
|
||||
data = json.loads(response.read())
|
||||
|
||||
|