mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-25 17:33:17 +01:00
Update open-dashboards.ps1
This commit is contained in:
parent
99805974ef
commit
78378f1128
@ -5,8 +5,8 @@
|
||||
This PowerShell script launches the web browser with tabs of 18 dashboard websites.
|
||||
.EXAMPLE
|
||||
PS> ./open-dashboards.ps1
|
||||
⏳ (1/2) Loading Data/web-dashboards.csv...
|
||||
⏳ (2/2) Launching web browser with tabs of Toggl Track · Google Calendar · CNN News...
|
||||
⏳ (1/2) Reading Data/popular-dashboards.csv...
|
||||
⏳ (2/2) Launching web browser tabs with: Toggl Track · Google Calendar · CNN News...
|
||||
...
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
@ -16,10 +16,10 @@
|
||||
|
||||
try {
|
||||
$stopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||
Write-Host "⏳ (1/2) Loading Data/web-dashboards.csv..."
|
||||
$table = Import-CSV "$PSScriptRoot/../Data/web-dashboards.csv"
|
||||
Write-Host "⏳ (1/2) Reading Data/popular-dashboards.csv..."
|
||||
$table = Import-CSV "$PSScriptRoot/../Data/popular-dashboards.csv"
|
||||
$numRows = $table.Length
|
||||
Write-Host "⏳ (2/2) Launching web browser with tabs of " -noNewline
|
||||
Write-Host "⏳ (2/2) Launching web browser tabs with: " -noNewline
|
||||
foreach($row in $table) {
|
||||
Write-Host "$($row.NAME) · " -noNewline
|
||||
& "$PSScriptRoot/open-default-browser.ps1" "$($row.URL)"
|
||||
@ -27,7 +27,7 @@ try {
|
||||
}
|
||||
Write-Host ""
|
||||
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
||||
"✅ Opened $NumRows web dashboards in $elapsed sec (Hint: use 'switch-tabs.ps1' to switch between the tabs automatically)"
|
||||
"✅ Opened $NumRows dashboards in $elapsed sec (Hint: use 'switch-tabs.ps1' to switch between the tabs automatically)"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user