mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-31 15:43:54 +00:00
Add chart stats for ps gallery module
This commit is contained in:
13
Examples/Extra/Get-ModuleStats.ps1
Normal file
13
Examples/Extra/Get-ModuleStats.ps1
Normal 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
|
||||
Reference in New Issue
Block a user