diff --git a/cv b/cv index ac1899d..b9301ab 100755 --- a/cv +++ b/cv @@ -26,6 +26,12 @@ get(){ jq -r ".$1" < "$data/$date-$country" fi } +getpct(){ + # FIXME: Seriously, this is ugly as fuck. Fix ASAP! + # Also don't get this out of dev, kthx + w=10 + printf "║ %-${w}s ║ %${w}s ║ %-${w}s ║\n" "" "$(echo "$(bc <<< "scale = 1; $(get $1) / 10000") %")" "" +} yget(){ date=$ydate if [ -f "$data/$date-$country" ] @@ -63,6 +69,7 @@ result(){ out Recovered recovered out Tests tests out "╰> Per 1M" testsPerOneMillion + getpct testsPerOneMillion if [ ! -f $data/$ydate-$country ] || [ $(get todayCases) == "0" ] then frame line