In-The-Moment

Sorry to Geek out on my Blog RSS Feed...

I worked out a way to get a few lines from my blog using powershell. Yes, geeky, but cool. AND, #Bearblog gives me a way to display code. This service keeps getting better and better. #powershell #rss #bearblog #development

RSS on my Blog

<#
The powershell script will export my blog writtings, but not download the pictures
So cool to be able to do this.  
Sorry to geek out like this....
#>

#https://in-the-moment.bearblog.dev/feed/


 $feedUrl = "https://in-the-moment.bearblog.dev/feed/?type=rss"
 #$rss.rss.content -expandproperty
 $rss = Invoke-WebRequest -Uri $feedUrl -UseBasicParsing
$entries = $rss.rss.channel.item
 foreach ($item in $entries) {write-host "$($item.title), $($item.pubDate),$($item.category),$($item.link),$($item.description)"}


#now putting this in to a table 
$entriitem = @()
foreach ($item in $entries)
{
    $entriitem += [PSCustomObject]@{
        Title = $item.title
        CreatedDate = $item.pubDate
        Tags = $item.category
        Description = $item.description
    }
}
$entriitem | format-list

#Development #howto #mastodon