Add list-tiobe-index.ps1

This commit is contained in:
Markus Fleschutz 2021-06-24 10:15:46 +02:00
parent ee03928841
commit 3aa8df2cef
4 changed files with 70 additions and 0 deletions

21
Data/TIOBE-index.csv Normal file
View File

@ -0,0 +1,21 @@
Language, Popularity, Change
C, 12.54, -4.65%
Python, 11.84, +3.48%
Java, 11.54, -4.56%
C++, 7.36, +1.41%
C#, 4.33, -0.40%
Visual Basic, 4.01, -0.68%
JavaScript, 2.33, +0.06%
PHP, 2.21, -0.05%
Assembly language, 2.05, +1.09%
SQL, 1.88, +0.15%
Classic Visual Basic, 1.72, +1.07%
Groovy, 1.29, +0.87%
Ruby, 1.23, +0.25%
R, 1.20, -0.99%
Perl, 1.18, +0.36%
Swift, 1.10, -0.35%
Fortran, 1.07, +0.80%
Delphi/Object Pascal, 1.06, +0.47%
MATLAB, 1.05, +0.15%
Go, 0.95, -0.06%
1 Language Popularity Change
2 C 12.54 -4.65%
3 Python 11.84 +3.48%
4 Java 11.54 -4.56%
5 C++ 7.36 +1.41%
6 C# 4.33 -0.40%
7 Visual Basic 4.01 -0.68%
8 JavaScript 2.33 +0.06%
9 PHP 2.21 -0.05%
10 Assembly language 2.05 +1.09%
11 SQL 1.88 +0.15%
12 Classic Visual Basic 1.72 +1.07%
13 Groovy 1.29 +0.87%
14 Ruby 1.23 +0.25%
15 R 1.20 -0.99%
16 Perl 1.18 +0.36%
17 Swift 1.10 -0.35%
18 Fortran 1.07 +0.80%
19 Delphi/Object Pascal 1.06 +0.47%
20 MATLAB 1.05 +0.15%
21 Go 0.95 -0.06%

View File

@ -123,6 +123,7 @@ list-tags.ps1, lists all tags in the current/given Git repository
list-tasks.ps1, lists all Windows scheduler tasks
list-timezone.ps1, lists the current time zone details
list-timezones.ps1, lists all time zones available
list-tiobe-index.ps1, lists the TIOBE index of top programming languages
list-user-groups.ps1, lists the user groups on the local computer
list-weather.ps1, lists the hourly weather
list-workdir.ps1, lists the current working directory

1 Script Description
123 list-tasks.ps1 lists all Windows scheduler tasks
124 list-timezone.ps1 lists the current time zone details
125 list-timezones.ps1 lists all time zones available
126 list-tiobe-index.ps1 lists the TIOBE index of top programming languages
127 list-user-groups.ps1 lists the user groups on the local computer
128 list-weather.ps1 lists the hourly weather
129 list-workdir.ps1 lists the current working directory

View File

@ -203,6 +203,7 @@ Mega Collection of PowerShell Scripts
* [list-random-passwords.ps1](Scripts/list-random-passwords.ps1) - prints a list of random passwords
* [list-random-pins.ps1](Scripts/list-random-pins.ps1) - prints a list of random PIN's
* [list-sql-tables.ps1](Scripts/list-sql-tables.ps1) - lists the SQL server tables
* [list-tiobe-index.ps1](Scripts/list-tiobe-index.ps1) - lists the TIOBE index of top programming languages
* [list-weather.ps1](Scripts/list-weather.ps1) - lists the hourly weather
* [locate-city.ps1](Scripts/locate-city.ps1) - prints the geographic location of the given city
* [locate-ipaddress.ps1](Scripts/locate-ipaddress.ps1) - prints the geographic location of the given IP address

View File

@ -0,0 +1,47 @@
<#
.SYNTAX list-tiobe-index.ps1
.DESCRIPTION lists the TIOBE index of top programming languages
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
function WriteBar { param([string]$Text, [float]$Value, [float]$Max, [string]$Hint)
$Num = ($Value * 70.0) / $Max
while ($Num -ge 1.0) {
write-host -noNewLine ""
$Num -= 1.0
}
if ($Num -ge 0.875) {
write-host -noNewLine ""
} elseif ($Num -ge 0.75) {
write-host -noNewLine ""
} elseif ($Num -ge 0.625) {
write-host -noNewLine ""
} elseif ($Num -ge 0.5) {
write-host -noNewLine ""
} elseif ($Num -ge 0.375) {
write-host -noNewLine ""
} elseif ($Num -ge 0.25) {
write-host -noNewLine ""
} elseif ($Num -ge 0.125) {
write-host -noNewLine ""
}
" $Text $($Value)% ($Hint)"
}
try {
& write-big.ps1 "TIOBE INDEX 2021-06"
""
$Table = import-csv "$PSScriptRoot/../Data/TIOBE-index.csv"
foreach($Row in $Table) {
[string]$Name = $Row.Language
[float]$Value = $Row.Popularity
[string]$Hint = $Row.Change
WriteBar $Name $Value 14.0 $Hint
}
exit 0
} catch {
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}