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