mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-18 16:39:03 +02:00
Update check-health.ps1, list-news.ps1, and write-typewriter.ps1
This commit is contained in:
@@ -21,12 +21,13 @@ try {
|
||||
[xml]$Content = (Invoke-WebRequest -URI $RSS_URL -useBasicParsing).Content
|
||||
[int]$Count = 1
|
||||
foreach ($Item in $Content.rss.channel.item) {
|
||||
"→ $($Item.title)"
|
||||
# "→ $($Item.title)"
|
||||
& "$PSScriptRoot/write-typewriter.ps1" "→ $($Item.title)" 30 # ms speed
|
||||
if ($Count++ -eq $MaxCount) { break }
|
||||
}
|
||||
$Source = $Content.rss.channel.title
|
||||
$Date = $Content.rss.channel.pubDate
|
||||
" Source: $Source (as of $Date)"
|
||||
" Updated: $Date by: $Source"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Reference in New Issue
Block a user