From 0b10d8581939db9dcb7482c09d1434a4f0c6a955 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sun, 27 Jun 2021 11:40:47 +0200 Subject: [PATCH] Improve list-tiobe-index.ps1 --- Scripts/list-tiobe-index.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Scripts/list-tiobe-index.ps1 b/Scripts/list-tiobe-index.ps1 index 4582cca8..b12bd373 100644 --- a/Scripts/list-tiobe-index.ps1 +++ b/Scripts/list-tiobe-index.ps1 @@ -6,7 +6,7 @@ #> function WriteBar { param([string]$Text, [float]$Value, [float]$Max, [float]$Change) - $Num = ($Value * 70.0) / $Max + $Num = ($Value * 100.0) / $Max while ($Num -ge 1.0) { write-host -noNewLine "█" $Num -= 1.0 @@ -26,7 +26,7 @@ function WriteBar { param([string]$Text, [float]$Value, [float]$Max, [float]$Cha } elseif ($Num -ge 0.125) { write-host -noNewLine "▏" } - write-host -noNewLine " $Text $($Value)%" + write-host -noNewLine " $Text $($Value)%" if ($Change -ge 0.0) { write-host -foregroundColor green " +$($Change)%" } else { @@ -36,6 +36,7 @@ function WriteBar { param([string]$Text, [float]$Value, [float]$Max, [float]$Cha try { & write-big.ps1 "TIOBE INDEX 2021-06" + " Source: https://www.tiobe.com" "" $Table = import-csv "$PSScriptRoot/../Data/TIOBE-index.csv"