Skip to content

Instantly share code, notes, and snippets.

@kamack38
Last active April 14, 2022 11:03
Show Gist options
  • Save kamack38/28204ad5880aa127a2d1e097e5576321 to your computer and use it in GitHub Desktop.
Save kamack38/28204ad5880aa127a2d1e097e5576321 to your computer and use it in GitHub Desktop.
Easily convert Visual Studio Code Extensions list to HTML spoiler
[array]$data = code --list-extensions
$file = ".\codeExtensions.html"
Write-Output '<details>' > $file
Write-Output ' <summary>' >> $file
Write-Output ' VSCode Extensions' >> $file
Write-Output ' </summary>' >> $file
Write-Output ' <ul>' >> $file
for ($i = 0; $i -lt $data.length; $i++) {
Write-Output (' <li>' + '<a href="https://marketplace.visualstudio.com/items?itemName=' + $data[$i] + '">' + $data[$i] + '</a></li>') >> $file
}
Write-Output ' </ul>' >> $file
Write-Output '</details>' >> $file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment