|
Lines 1-6
Link Here
|
| 1 |
--- ansiweather.orig 2016-10-18 17:14:59 UTC |
1 |
--- ansiweather.orig 2017-02-16 12:27:22 UTC |
| 2 |
+++ ansiweather |
2 |
+++ ansiweather |
| 3 |
@@ -205,7 +205,7 @@ then |
3 |
@@ -207,7 +207,7 @@ then |
| 4 |
forecast=$([ "$forecast" -gt "$flength" ] && echo "$flength" || echo "$forecast") |
4 |
forecast=$([ "$forecast" -gt "$flength" ] && echo "$flength" || echo "$forecast") |
| 5 |
else |
5 |
else |
| 6 |
city=$(echo "$weather" | jq -r '.name') |
6 |
city=$(echo "$weather" | jq -r '.name') |
|
Lines 9-15
Link Here
|
| 9 |
humidity=$(echo "$weather" | jq '.main.humidity') |
9 |
humidity=$(echo "$weather" | jq '.main.humidity') |
| 10 |
pressure=$(echo "$weather" | jq '.main.pressure') |
10 |
pressure=$(echo "$weather" | jq '.main.pressure') |
| 11 |
sky=$(echo "$weather" | jq -r '.weather[0].main') |
11 |
sky=$(echo "$weather" | jq -r '.weather[0].main') |
| 12 |
@@ -285,7 +285,7 @@ case $units in |
12 |
@@ -287,7 +287,7 @@ case $units in |
| 13 |
scale="°C" |
13 |
scale="°C" |
| 14 |
speed_unit="m/s" |
14 |
speed_unit="m/s" |
| 15 |
pressure_unit="hPa" |
15 |
pressure_unit="hPa" |
|
Lines 18-24
Link Here
|
| 18 |
;; |
18 |
;; |
| 19 |
imperial) |
19 |
imperial) |
| 20 |
scale="°F" |
20 |
scale="°F" |
| 21 |
@@ -293,7 +293,7 @@ case $units in |
21 |
@@ -295,7 +295,7 @@ case $units in |
| 22 |
pressure_unit="inHg" |
22 |
pressure_unit="inHg" |
| 23 |
if [ "$forecast" = 0 ] |
23 |
if [ "$forecast" = 0 ] |
| 24 |
then |
24 |
then |
|
Lines 27-33
Link Here
|
| 27 |
fi |
27 |
fi |
| 28 |
;; |
28 |
;; |
| 29 |
esac |
29 |
esac |
| 30 |
@@ -349,8 +349,8 @@ then |
30 |
@@ -351,8 +351,8 @@ then |
| 31 |
do |
31 |
do |
| 32 |
day=$(echo "$weather" | jq ".list[$i]") |
32 |
day=$(echo "$weather" | jq ".list[$i]") |
| 33 |
date=$(epoch_to_date "$(echo "$day" | jq -r '.dt')") |
33 |
date=$(epoch_to_date "$(echo "$day" | jq -r '.dt')") |
|
Lines 38-44
Link Here
|
| 38 |
|
38 |
|
| 39 |
icon="" |
39 |
icon="" |
| 40 |
if [ "$symbols" = true ] |
40 |
if [ "$symbols" = true ] |
| 41 |
@@ -397,7 +397,7 @@ fi |
41 |
@@ -399,7 +399,7 @@ fi |
| 42 |
|
42 |
|
| 43 |
if [ "$ansi" = true ] |
43 |
if [ "$ansi" = true ] |
| 44 |
then |
44 |
then |