Behind the PowerShell Pipeline logo

Behind the PowerShell Pipeline

Subscribe
Archives
March 5, 2024

Documents and Objects

Over the course of the last few weeks, I've been sharing my experiences in building PowerShell tooling that I can use to create an archive index for this newsletter. I'm still unsure on how I want to present this information to you I've been able to get a list of all archived emails from the Buttondown API. I've been using that data to create a content summary with excerpts. This has involved a lot more string parsing than I had hoped, but regular expressions help a lot. Because this is a long process, I've saved data to an an XML file using `Export-Clixml`. At some point, I'll need to revisit the code I used to get the data via the API, and turn it into a proper PowerShell tool. For now, I'll import this data to continue parsing it.

$all = Import-Clixml C:\scripts\behind-api-emails.xml
When we left off, I had code to parse the content and create a summary document using markdown.
Summary markdown preview
figure 1
But there are problems.
Summary markdown preview problems
figure 2
The first problem to deal with is misconfigured code fences. In the sample markdown document I'm creating a preview snippet parsing text and words. The text is markdown which means I am getting text like code fences.
Missing code fence
figure 3
The problem is that I have an opening code fence as indicated by the arrow, but there is no closing code fence. How can I account for this?
Please subscribe for full article and archive access

Over the course of the last few weeks, I've been sharing my experiences in building PowerShell tooling that I can use to create an archive index for this newsletter. I'm still unsure on how I want to present this information to you I've been able to get a list of all archived emails from the Buttondown API. I've been using that data to create a content summary with excerpts. This has involved a lot more string parsing than I had hoped, but regular expressions help a lot.

Because this is a long process, I've saved data to an an XML file using Export-Clixml. At some point, I'll need to revisit the code I used to get the data via the API, and turn it into a proper PowerShell tool. For now, I'll import this data to continue parsing it.

$all = Import-Clixml C:\scripts\behind-api-emails.xml
Want to read the full issue?
GitHub Bluesky LinkedIn About Jeff
Powered by Buttondown, the easiest way to start and grow your newsletter.