Update open-dashboards.ps1

This commit is contained in:
Markus Fleschutz 2023-08-21 22:53:15 +02:00
parent f8159e0769
commit 48bd375632
2 changed files with 8 additions and 10 deletions

View File

@ -11,6 +11,7 @@ NAME,URL,
"FlightRadar24","https://www.flightradar24.com/27.63,-6.98/3", "FlightRadar24","https://www.flightradar24.com/27.63,-6.98/3",
"Earthquake Watch","https://www.arcgis.com/apps/dashboards/c8af9c5411814584b460cc87cb7c3780", "Earthquake Watch","https://www.arcgis.com/apps/dashboards/c8af9c5411814584b460cc87cb7c3780",
"Live Cyber Threat Map","https://threatmap.checkpoint.com", "Live Cyber Threat Map","https://threatmap.checkpoint.com",
"Live Traffic","https://www.msn.com/en-us/traffic?lvl=11&intent=roadClosures",
"Netflix Top 10","https://www.netflix.com/tudum/top10/", "Netflix Top 10","https://www.netflix.com/tudum/top10/",
"YouTube Music Charts","https://charts.youtube.com/", "YouTube Music Charts","https://charts.youtube.com/",
"Webcams","https://www.foto-webcam.eu", "Webcams","https://www.foto-webcam.eu",

1 NAME URL
11 FlightRadar24 https://www.flightradar24.com/27.63,-6.98/3
12 Earthquake Watch https://www.arcgis.com/apps/dashboards/c8af9c5411814584b460cc87cb7c3780
13 Live Cyber Threat Map https://threatmap.checkpoint.com
14 Live Traffic https://www.msn.com/en-us/traffic?lvl=11&intent=roadClosures
15 Netflix Top 10 https://www.netflix.com/tudum/top10/
16 YouTube Music Charts https://charts.youtube.com/
17 Webcams https://www.foto-webcam.eu

View File

@ -2,11 +2,10 @@
.SYNOPSIS .SYNOPSIS
Open web dashboards Open web dashboards
.DESCRIPTION .DESCRIPTION
This PowerShell script launches the web browser with tabs of 18 dashboard websites. This PowerShell script launches the Web browser with 20 tabs of popular dashboard websites.
.EXAMPLE .EXAMPLE
PS> ./open-dashboards.ps1 PS> ./open-dashboards.ps1
(1/2) Reading Data/popular-dashboards.csv... Launching Web browser with 20 tabs showing: Toggl Track, Google Calendar, Google Mail, Google Keep, Google Photos, Google News, Outlook Mail, CNN News, GitHub Explore, FlightRadar24, Earthquake Watch, Live Cyber Threat Map, Live Traffic, Netflix Top 10, YouTube Music Charts, Webcams, Peak Zugspitze, Airport Salzburg, Windy Weather Radar, Windy Weather Temperatures, (Hint: execute './switch-tabs.ps1' for automated tab switching)
(2/2) Launching web browser tabs with: Toggl Track · Google Calendar · CNN News...
... ...
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
@ -15,19 +14,17 @@
#> #>
try { try {
$stopWatch = [system.diagnostics.stopwatch]::startNew() Write-Progress "⏳ Reading Data/popular-dashboards.csv..."
Write-Host "⏳ (1/2) Reading Data/popular-dashboards.csv..."
$table = Import-CSV "$PSScriptRoot/../Data/popular-dashboards.csv" $table = Import-CSV "$PSScriptRoot/../Data/popular-dashboards.csv"
$numRows = $table.Length $numRows = $table.Length
Write-Host "⏳ (2/2) Launching web browser tabs with: " -noNewline Write-Progress -completed "."
Write-Host "✅ Launching Web browser with 20 tabs showing: " -noNewline
foreach($row in $table) { foreach($row in $table) {
Write-Host "$($row.NAME) · " -noNewline Write-Host "$($row.NAME), " -noNewline
& "$PSScriptRoot/open-default-browser.ps1" "$($row.URL)" & "$PSScriptRoot/open-default-browser.ps1" "$($row.URL)"
Start-Sleep -milliseconds 100 Start-Sleep -milliseconds 100
} }
Write-Host "" Write-Host "(Hint: execute './switch-tabs.ps1' for automated tab switching)"
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
"✅ Opened $NumRows dashboards in $elapsed sec (Hint: use 'switch-tabs.ps1' to switch between the tabs automatically)"
exit 0 # success exit 0 # success
} catch { } catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"