diff --git a/Data/scripts.csv b/Data/scripts.csv index 3a562cea..e6083a7a 100644 --- a/Data/scripts.csv +++ b/Data/scripts.csv @@ -66,6 +66,7 @@ list-anagrams.ps1, lists all anagrams of the given word list-automatic-variables.ps1, lists the automatic variables of PowerShell list-branches.ps1, lists all branches in the current/given Git repository list-cheat-sheet.ps1, lists the PowerShell cheat sheet +list-city-weather.ps1, lists the current weather of cities worldwide (east to west) list-commits.ps1, lists all commits in the current/given Git repository list-clipboard.ps1, lists the contents of the clipboard list-dir-tree.ps1, lists a directory tree @@ -169,7 +170,6 @@ voice-control.ps1, executes the PowerShell scripts by voice weather.ps1, prints the current weather forecast weather-alert.ps1, checks the current weather for critical values weather-report.ps1, prints the local weather report -weather-worldwide.ps1, prints the current weather of cities worldwide wakeup.ps1, sends a magic packet to the given computer, waking him up write-animated.ps1, writes animated text write-big.ps1, writes the given text in big letters diff --git a/README.md b/README.md index 12960e32..9e89ea2d 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ Mega Collection of PowerShell Scripts * [display-time.ps1](Scripts/display-time.ps1) - displays the current time for 10 seconds by default * [generate-qrcode.ps1](Scripts/generate-qrcode.ps1) - generates a QR code * [list-anagrams.ps1](Scripts/list-anagrams.ps1) - lists all anagrams of the given word +* [list-city-weather.ps1](Scripts/list-city-weather.ps1) - lists the current weather of cities worldwide (west to east) * [list-environment-variables.ps1](Scripts/list-environment-variables.ps1) - lists all environment variables * [list-fritzbox-calls.ps1](Scripts/list-fritzbox-calls.ps1) - lists the FRITZ!Box calls * [list-fritzbox-devices.ps1](Scripts/list-fritzbox-devices.ps1) - lists FRITZ!Box's known devices @@ -195,7 +196,6 @@ Mega Collection of PowerShell Scripts * [weather.ps1](Scripts/weather.ps1) - prints the current weather forecast * [weather-alert.ps1](Scripts/weather-alert.ps1) - checks the current weather for critical values * [weather-report.ps1](Scripts/weather-report.ps1) - prints the local weather report -* [weather-worldwide.ps1](Scripts/weather-worldwide.ps1) - prints the current weather of cities worldwide * [write-animated.ps1](Scripts/write-animated.ps1) - writes animated text * [write-big.ps1](Scripts/write-big.ps1) - writes the given text in big letters * [write-blue.ps1](Scripts/write-blue.ps1) - writes the given text in a blue foreground color diff --git a/Scripts/weather-worldwide.ps1 b/Scripts/list-city-weather.ps1 similarity index 53% rename from Scripts/weather-worldwide.ps1 rename to Scripts/list-city-weather.ps1 index 5f87928f..7d8ca221 100755 --- a/Scripts/weather-worldwide.ps1 +++ b/Scripts/list-city-weather.ps1 @@ -1,7 +1,7 @@ -#!/usr/bin/pwsh +ļ»æ#!/usr/bin/pwsh <# -.SYNTAX weather-worldwide.ps1 -.DESCRIPTION prints the current weather of cities world-wide +.SYNTAX list-city-weather.ps1 +.DESCRIPTION list the current weather of cities world-wide (west to east) .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz / License: CC0 #> @@ -9,14 +9,10 @@ $Cities="Hawaii","Los Angeles","Mexico City","Miami","New York","Rio de Janeiro","Paris","London","Berlin","Cape Town","Dubai","Mumbai","Singapore","Hong Kong","Peking","Tokyo","Sydney" try { - write-output "Current Weather Report World-wide" - write-output "=================================" - write-output "" foreach($City in $Cities) { - $Line = (Invoke-WebRequest http://wttr.in/${City}?format="%l:+%c+%t+%p+%h+%P+%w +%S ->+%s" -UserAgent "curl").Content - write-output "* $Line" + $Line = (Invoke-WebRequest http://wttr.in/${City}?format="%c %l+%t+%p+%h+%P+%w +%S ā†’+%s" -UserAgent "curl").Content + "$Line" } - write-output "" exit 0 } catch { write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Scripts/my-profile.ps1 b/Scripts/my-profile.ps1 index d97ab332..86d9bf6f 100755 --- a/Scripts/my-profile.ps1 +++ b/Scripts/my-profile.ps1 @@ -9,8 +9,7 @@ if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME } $Hostname = $(hostname) $host.ui.RawUI.WindowTitle = "$Username @ $Hostname" -write-host "šŸ§‘ $Username enters PowerShell $($PSVersionTable.PSVersion) at $Hostname in $(Get-Location)" -write-host "" +"šŸ§‘ $Username enters šŸ’»$Hostname at $(Get-Location)" # My Command Prompt @@ -26,8 +25,4 @@ function prompt { "`nšŸ’² " } # result is: šŸ’² # -------------- set-alias -name cwd -value list-workdir.ps1 # cwd = current working directory set-alias -name ll -value get-childitem # ll = list long -set-alias -name lsf -value list-formatted.ps1 # lsf = list directory formatted - - - - +set-alias -name lsf -value list-formatted.ps1 # lsf = list directory formatted \ No newline at end of file diff --git a/Scripts/set-profile.ps1 b/Scripts/set-profile.ps1 index e17e84c4..03040d62 100755 --- a/Scripts/set-profile.ps1 +++ b/Scripts/set-profile.ps1 @@ -13,7 +13,6 @@ try { copy-item "$PathToRepo/Scripts/my-profile.ps1" "$PathToProfile" -force "āœ”ļø PowerShell profile 'CurrentUserCurrentHost' updated by my-profile.ps1 - it gets active on next login" - "" exit 0 } catch { write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"