Browse Source

unicode ftw!

master
Norwin Roosen 2 months ago
parent
commit
c9c8ee5e39
1 changed files with 7 additions and 6 deletions
  1. 7
    6
      00opensensemap.r.3m.sh

+ 7
- 6
00opensensemap.r.3m.sh View File

@@ -8,17 +8,18 @@ boxMeta=`curl "${API}/boxes/${BOX}"`
8 8
 sensors=`curl "${API}/boxes/${BOX}/sensors"`
9 9
 updated=`echo $boxMeta | jq -r '.lastMeasurementAt'`
10 10
 weblink=`echo $boxMeta | jq -r '.weblink'`
11
-
12
-echo $boxMeta | jq -r '.name'
11
+name=`echo $boxMeta | jq -r '.name'`
12
+temp=`echo $sensors | jq -r '.sensors[0] | .lastMeasurement.value + .unit'`
13
+echo "$name 🌡 $temp"
13 14
 
14 15
 echo "---"
15 16
 echo $sensors | jq -r '.sensors[] | .title + ":\t\t" + .lastMeasurement.value + " " + .unit'
16 17
 
17 18
 echo "---"
18
-echo "last measurement from `date -d $updated +'%d.%m. %H:%M'`"
19
-echo "refresh | refresh=true"
19
+echo "🕗\tdata from `date -d $updated +'%d.%m. %H:%M'`"
20
+echo "⭮\trefresh | refresh=true"
20 21
 
21 22
 echo "---"
22
-echo "view on openSenseMap.org | href='https://opensensemap.org/explore/$BOX'"
23
-[ ! $weblink == "null" ] && echo "open weblink | href='$weblink'"
23
+echo "🗺view on openSenseMap.org | href='https://opensensemap.org/explore/$BOX'"
24
+[ ! $weblink == "null" ] && echo "🔗\topen weblink | href='$weblink'"
24 25
 

Loading…
Cancel
Save