Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
majkinetor authored Sep 21, 2017
1 parent e62c466 commit 00168a0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,19 @@ 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 = @('# <img src="" width="48" height="48"/> [{0}](https://chocolatey.org/packages/{0})' -f $package.Name, '')
$readme += $package.NuspecXml.package.metadata.description -split "`n" | % { $_.Trim() }
$readme -join "`n" | Out-File $_\README.md
}
```

### Checks

The `update` function does the following checks:
Expand Down

0 comments on commit 00168a0

Please sign in to comment.