mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-06 22:19:09 +01:00
Updated list-news.ps1 and watch-news.ps1
This commit is contained in:
parent
ca3a9dd069
commit
c1a010f016
@ -12,7 +12,7 @@
|
|||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./list-news.ps1
|
PS> ./list-news.ps1
|
||||||
|
|
||||||
UTC HEADLINES (by https://www.yahoo.com/news/world
|
UTC HEADLINES (source: https://www.yahoo.com/news/world)
|
||||||
--- ---------
|
--- ---------
|
||||||
09:15 • Deadly Mediterranean wildfires kill more than 40
|
09:15 • Deadly Mediterranean wildfires kill more than 40
|
||||||
...
|
...
|
||||||
@ -28,7 +28,7 @@ try {
|
|||||||
[xml]$content = (Invoke-WebRequest -URI $RSS_URL -useBasicParsing).Content
|
[xml]$content = (Invoke-WebRequest -URI $RSS_URL -useBasicParsing).Content
|
||||||
$title = $content.rss.channel.title
|
$title = $content.rss.channel.title
|
||||||
$URL = $content.rss.channel.link
|
$URL = $content.rss.channel.link
|
||||||
Write-Host "`n UTC HEADLINES (by " -noNewline
|
Write-Host "`n UTC HEADLINES (source: " -noNewline
|
||||||
Write-Host $URL -foregroundColor blue -noNewline
|
Write-Host $URL -foregroundColor blue -noNewline
|
||||||
Write-Host ")"
|
Write-Host ")"
|
||||||
Write-Host " --- ---------"
|
Write-Host " --- ---------"
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./watch-news.ps1
|
PS> ./watch-news.ps1
|
||||||
|
|
||||||
UTC HEADLINES (by: https://www.yahoo.com/news/world)
|
UTC HEADLINES (source: https://www.yahoo.com/news/world)
|
||||||
--- ------------------------------------------------
|
--- ---------
|
||||||
14:29 Niger coup: Ecowas deadline sparks anxiety in northern Nigeria
|
14:29 Niger coup: Ecowas deadline sparks anxiety in northern Nigeria
|
||||||
...
|
...
|
||||||
.LINK
|
.LINK
|
||||||
@ -44,10 +44,10 @@ try {
|
|||||||
[xml]$content = (Invoke-WebRequest -URI $URL -useBasicParsing).Content
|
[xml]$content = (Invoke-WebRequest -URI $URL -useBasicParsing).Content
|
||||||
$title = $content.rss.channel.title.toUpper()
|
$title = $content.rss.channel.title.toUpper()
|
||||||
$link = $content.rss.channel.link
|
$link = $content.rss.channel.link
|
||||||
Write-Host "`n UTC HEADLINES (by: " -noNewline
|
Write-Host "`n UTC HEADLINES (source: " -noNewline
|
||||||
Write-Host $link -foregroundColor blue -noNewline
|
Write-Host $link -foregroundColor blue -noNewline
|
||||||
Write-Host ")"
|
Write-Host ")"
|
||||||
Write-Host " --- ------------------------------------------------"
|
Write-Host " --- ---------"
|
||||||
$latestTimestamp = "2000-01-01"
|
$latestTimestamp = "2000-01-01"
|
||||||
$icon = ""
|
$icon = ""
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user