mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-25 13:36:39 +01:00
Rename to list-city-weather.ps1
This commit is contained in:
parent
fbad5259f7
commit
e273ec2d9e
@ -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
|
||||
|
Can't render this file because it has a wrong number of fields in line 159.
|
@ -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
|
||||
|
@ -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])"
|
@ -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
|
@ -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])"
|
||||
|
Loading…
Reference in New Issue
Block a user