Add chart stats for ps gallery module

This commit is contained in:
dfinke
2016-03-22 09:28:57 -04:00
parent 42d0ad0378
commit 3b69c88474

View File

@@ -0,0 +1,13 @@
param(
[Parameter(Mandatory=$true)]
$moduleName,
[ValidateSet('Column','Bar','Line','Pie')]
$chartType="Line"
)
$galleryUrl = "https://www.powershellgallery.com/packages/$moduleName"
$nolegend = '-nolegend'
if($chartType -eq 'pie') {$nolegend = $null}
$code = "$($chartType)Chart (Get-HtmlTable $galleryUrl 0) -title 'Download stats for $moduleName' $nolegend"
$code | Invoke-Expression