mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-20 08:58:18 +02:00
Update open-dashboards.ps1
This commit is contained in:
parent
aa49dc412f
commit
1eec45fb63
@ -1,12 +1,12 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Open Web dashboards
|
Open web dashboards
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script launches the Web browser with tabs of popular dashboard websites.
|
This PowerShell script launches the web browser with tabs of 18 dashboard websites.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./open-dashboards.ps1
|
PS> ./open-dashboards.ps1
|
||||||
⏳ (1/2) Loading Data/web-dashboards.csv...
|
⏳ (1/2) Loading Data/web-dashboards.csv...
|
||||||
⏳ (2/2) Launching Web browser with tabs... Toggl Track · Google Calendar · CNN News...
|
⏳ (2/2) Launching web browser with tabs: Toggl Track · Google Calendar · CNN News...
|
||||||
...
|
...
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
@ -19,7 +19,7 @@ try {
|
|||||||
Write-Host "⏳ (1/2) Loading Data/web-dashboards.csv..."
|
Write-Host "⏳ (1/2) Loading Data/web-dashboards.csv..."
|
||||||
$table = Import-CSV "$PSScriptRoot/../Data/web-dashboards.csv"
|
$table = Import-CSV "$PSScriptRoot/../Data/web-dashboards.csv"
|
||||||
$numRows = $table.Length
|
$numRows = $table.Length
|
||||||
Write-Host "⏳ (2/2) Launching Web browser with tabs... " -noNewline
|
Write-Host "⏳ (2/2) Launching web browser with tabs: " -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)"
|
||||||
@ -27,7 +27,7 @@ try {
|
|||||||
}
|
}
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
||||||
"✅ opened $NumRows Web dashboards in $elapsed sec (Hint: use switch-tabs.ps1 to switch between browser tabs automatically)"
|
"✅ Opened $NumRows web dashboards in $elapsed sec (Hint: use switch-tabs.ps1 to switch between browser tabs automatically)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user