Skip to content

Commit 14c72ba

Browse files
committed
Minor changes
1 parent 6264d85 commit 14c72ba

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

ChangeLog.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
All notable changes will be documented in this file
33

44
## [1.0.0] 2016-10-21
5-
### Version 1.0.0 released
5+
### Version 1.0.0 released

README.md

+10-15
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,38 @@
11
# Get NuGet Package Metadata
22
Ever wanted to get metadata from your NuGet packages, such as author or license information?
33
Got lost looking for it in Visual Studio? Are you looking for a simple script that is able to
4-
output all metadata information from a single command? This cmdlet is easy to use and
5-
simple to integrate with your build / continuous integration process. If you don't have any
6-
previous experience with scripting or PowerShell, follow the examples below.
4+
output all metadata information from a single command?
5+
Look no further!
6+
7+
This cmdlet is easy to use and simple to integrate with your build / continuous integration process.
8+
9+
If you don't have any previous experience with scripting or PowerShell, follow the examples below.
710

811
## Installation
912

1013
## Examples
1114
### Simple usage
12-
By default, the cmdlet recursively searches for .nupkg files relative to the folder you're in.
13-
If you're using visual studio, open a PowerShell prompt on your project directory and run:
15+
By default, the cmdlet recursively searches for .nupkg files in the folder you're in.
16+
Open a PowerShell prompt in your project directory and run:
1417
```sh
1518
$ Get-NuGetMetadata
1619
```
1720
It should output the metadata contents of every NuGet package within the project.
1821
## Exporting output
22+
With powershell it's easy to save the data to file.
1923
### To CSV
20-
With powershell, saving information is as simple as piping the output of the GetNugetMetadata command
21-
to a different command, which writes data to file.
2224
```sh
2325
$ Get-NuGetMetadata | Export-Csv -NoTypeInformation ./my-metadata-file.csv
2426
```
2527
This produces a file named my-metadata-file.csv in the directory you are in.
2628
### To JSON
2729
Since the Get-NugetMetadata cmdlet produces xml, it can't be easily converted to Json using ConvertTo-Json.
28-
One workaround is to construct a custom PSObject by filtering properties of the metadata as such:
30+
One workaround is to pipe via select, which then creates a PSObject that can be converted:
2931
```sh
3032
$ Get-NuGetMetadata | Select-Object id, version, licenseUrl | ConvertTo-Json | Out-File ./my-metadata-file.csv
3133
```
3234

3335

34-
### Converting output to JSON
35-
36-
37-
38-
3936
## Release History
4037

4138
* 1.0.0
@@ -44,5 +41,3 @@ $ Get-NuGetMetadata | Select-Object id, version, licenseUrl | ConvertTo-Json | O
4441
## License
4542

4643
Distributed under the MIT license. See ``LICENSE`` for more information.
47-
48-

0 commit comments

Comments
 (0)