Lines 1-15
Link Here
|
1 |
--- ansiweather.orig 2016-07-26 11:16:31 UTC |
1 |
--- ansiweather.orig 2016-10-18 17:14:59 UTC |
2 |
+++ ansiweather |
2 |
+++ ansiweather |
3 |
@@ -66,7 +66,7 @@ done |
3 |
@@ -205,7 +205,7 @@ then |
4 |
|
|
|
5 |
if [ "$usage" = true ] |
6 |
then |
7 |
- printf "%s\n" \ |
8 |
+ gprintf "%s\n" \ |
9 |
"" \ |
10 |
"AnsiWeather 1.08" \ |
11 |
"Copyright (c) 2013-2016, Frederic Cambus" \ |
12 |
@@ -224,7 +224,7 @@ then |
13 |
forecast=$([ "$forecast" -gt "$flength" ] && echo "$flength" || echo "$forecast") |
4 |
forecast=$([ "$forecast" -gt "$flength" ] && echo "$flength" || echo "$forecast") |
14 |
else |
5 |
else |
15 |
city=$(echo "$weather" | jq -r '.name') |
6 |
city=$(echo "$weather" | jq -r '.name') |
Lines 18-24
Link Here
|
18 |
humidity=$(echo "$weather" | jq '.main.humidity') |
9 |
humidity=$(echo "$weather" | jq '.main.humidity') |
19 |
pressure=$(echo "$weather" | jq '.main.pressure') |
10 |
pressure=$(echo "$weather" | jq '.main.pressure') |
20 |
sky=$(echo "$weather" | jq -r '.weather[0].main') |
11 |
sky=$(echo "$weather" | jq -r '.weather[0].main') |
21 |
@@ -304,7 +304,7 @@ case $units in |
12 |
@@ -285,7 +285,7 @@ case $units in |
22 |
scale="°C" |
13 |
scale="°C" |
23 |
speed_unit="m/s" |
14 |
speed_unit="m/s" |
24 |
pressure_unit="hPa" |
15 |
pressure_unit="hPa" |
Lines 27-33
Link Here
|
27 |
;; |
18 |
;; |
28 |
imperial) |
19 |
imperial) |
29 |
scale="°F" |
20 |
scale="°F" |
30 |
@@ -312,7 +312,7 @@ case $units in |
21 |
@@ -293,7 +293,7 @@ case $units in |
31 |
pressure_unit="inHg" |
22 |
pressure_unit="inHg" |
32 |
if [ "$forecast" = 0 ] |
23 |
if [ "$forecast" = 0 ] |
33 |
then |
24 |
then |
Lines 36-42
Link Here
|
36 |
fi |
27 |
fi |
37 |
;; |
28 |
;; |
38 |
esac |
29 |
esac |
39 |
@@ -368,8 +368,8 @@ then |
30 |
@@ -349,8 +349,8 @@ then |
40 |
do |
31 |
do |
41 |
day=$(echo "$weather" | jq ".list[$i]") |
32 |
day=$(echo "$weather" | jq ".list[$i]") |
42 |
date=$(epoch_to_date "$(echo "$day" | jq -r '.dt')") |
33 |
date=$(epoch_to_date "$(echo "$day" | jq -r '.dt')") |
Lines 47-53
Link Here
|
47 |
|
38 |
|
48 |
icon="" |
39 |
icon="" |
49 |
if [ "$symbols" = true ] |
40 |
if [ "$symbols" = true ] |
50 |
@@ -401,7 +401,7 @@ fi |
41 |
@@ -397,7 +397,7 @@ fi |
51 |
|
42 |
|
52 |
if [ "$ansi" = true ] |
43 |
if [ "$ansi" = true ] |
53 |
then |
44 |
then |