From 0667c7625b252138cf3ad348e53db4b11b4da934 Mon Sep 17 00:00:00 2001 From: Miodrag Milic Date: Thu, 21 Sep 2017 13:19:35 +0200 Subject: [PATCH] docs --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 17c730cf..adca0e4e 100644 --- a/README.md +++ b/README.md @@ -155,13 +155,13 @@ function global:au_AfterUpdate ($Package) { To extract descriptions from existing packages into README.md files the following script can be used: ```powershell -. $Env:ProgramFiles\WindowsPowerShell\Modules\AU\Private\AUPackage.ps1 - -ls | ? PSIsContainer | ? { !(Test-Path $_\Readme.md) } | % { - $package = New-Object AUPackage (Resolve-Path $_) - $readme = @('# [{0}](https://chocolatey.org/packages/{0})' -f $package.Name, $package.iconUrl, '') - $readme += $package.NuspecXml.package.metadata.description -split "`n" | % { $_.Trim() } - $readme -join "`n" | Out-File $_\README.md +ls | ? PSIsContainer | ? { !(Test-Path $_\README.md) | % { + [xml] $package = gc $_\*.nuspec + $meta = $package.package.metadata + $readme = ('# [{0}](https://chocolatey.org/packages/{0})' -f $meta.id, $meta.iconUrl), '' + $readme += $meta.description -split "`n" | % { $_.Trim() } + $readme -join "`n" | Out-File -Encoding UTF8 $_\README.md + $meta.id } ```