|
2 | 2 | .SYNOPSIS
|
3 | 3 | Open dashboards
|
4 | 4 | .DESCRIPTION
|
5 |
| - This PowerShell script launches the Web browser with tabs of some dashboard websites. |
| 5 | + This PowerShell script launches the Web browser with tabs of popular dashboard websites. |
6 | 6 | .EXAMPLE
|
7 | 7 | PS> ./open-dashboards
|
8 | 8 | ⏳ (1/2) Loading Data/popular-dashboards.csv...
|
9 |
| - ⏳ (2/2) Launching Web browser with tabs of dashboard websites... |
| 9 | + ⏳ (2/2) Launching Web browser with tabs: Toggl Track · Google Calendar · CNN World News... |
10 | 10 | ...
|
11 | 11 | .LINK
|
12 | 12 | https://github.com/fleschutz/PowerShell
|
|
17 | 17 | try {
|
18 | 18 | $stopWatch = [system.diagnostics.stopwatch]::startNew()
|
19 | 19 | Write-Host "⏳ (1/2) Loading Data/popular-dashboards.csv..."
|
20 |
| - $Table = Import-CSV "$PSScriptRoot/../Data/popular-dashboards.csv" |
21 |
| - $NumRows = $Table.Length |
22 |
| - Write-Host "⏳ (2/2) Launching Web browser with tabs of dashboard websites... " |
23 |
| - foreach($Row in $Table) { |
24 |
| - $Name = $Row.NAME |
25 |
| - $URL = $Row.URL |
26 |
| - Write-Host "$Name · " -noNewline |
27 |
| - & "$PSScriptRoot/open-default-browser.ps1" "$URL" |
| 20 | + $table = Import-CSV "$PSScriptRoot/../Data/popular-dashboards.csv" |
| 21 | + $numRows = $table.Length |
| 22 | + Write-Host "⏳ (2/2) Launching Web browser with tabs: " -noNewline |
| 23 | + foreach($row in $table) { |
| 24 | + Write-Host "$($row.NAME) · " -noNewline |
| 25 | + & "$PSScriptRoot/open-default-browser.ps1" "$($row.URL)" |
28 | 26 | Start-Sleep -milliseconds 50
|
29 | 27 | }
|
30 | 28 | Write-Host ""
|
31 | 29 | [int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
32 |
| - "Hint: use switch-tabs.ps1 to switch the browser tabs automatically" |
33 |
| - "✅ Opened $NumRows dashboards in $elapsed sec" |
| 30 | + "✅ Opened $NumRows dashboards in $elapsed sec (Hint: use switch-tabs.ps1 to switch between browser tabs automatically)" |
34 | 31 | exit 0 # success
|
35 | 32 | } catch {
|
36 | 33 | "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
|
0 commit comments