Skip to content

Commit

Permalink
v1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhitsolutions committed Sep 19, 2022
1 parent eeb0bef commit 54c813a
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 122 deletions.
10 changes: 10 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog for WingetTools

## v1.6.0

+ Added missing online help links.
+ Added localized data for `fr-FR`. This needs to be validated by someone running this culture as I'm not sure exactly what Winget will return.
+ Modified code to filter out extended ASCII characters when parsing YAML content.
+ Merged [PR #10](https://github.com/jdhitsolutions/WingetTools/pull/10) Thank you @Zephyrusg.
+ Modified conversion code to strip out Release Notes since that section often causes yaml conversion problems and it isn't being used.
+ Updated help.
+ Updated `README.md`.

## v1.5.0

+ Revised `Get-WGInstalled` to better handle non-English culture. [Issue #8](https://github.com/jdhitsolutions/WingetTools/issues/8)
Expand Down
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,29 @@ This command is a PowerShell wrapper aroung winget.cmd that will get a package a
The command has a default table view but the output object has other properties you might want to use.

```text
Name : GitHub CLI
ID : GitHub.cli
Version : 2.14.3
Publisher : GitHub, Inc.
Publisher URL : https://github.com
Publisher Support URL : https://help.github.com/en
Author : GitHub, Inc.
Moniker : gh
Description : gh is GitHub on the command line. It brings pull requests, issues, and other GitHub concepts
to the terminal next to where you are already working with git and your code.
Homepage : https://github.com/cli/cli
Moniker : gh
Description : gh is GitHub on the command line. It brings pull
requests, issues, and other GitHub concepts to
the terminal next to where you are already working with git and your code.
Author : GitHub, Inc.
Publisher : GitHub, Inc.
PublisherUrl : https://github.com
PublisherSupportUrl : https://help.github.com/en
Homepage : https://github.com/cli/cli
Name : GitHub CLI
ID : GitHub.cli
Version : 2.15.0
Source : winget
Computername : WIN11DESK
```

The command typically gets a single package, but you can pipe a winget search command to it.
The command typically gets a single package, but you can pipe a `winget search` command to it.

![get winget package search](images/get-wgpackage-2.png)

## [Get-WGInstalled](docs/Get-WGInstalled.md)

This command will get a list of all packages installed with winget. These will be packages with winget as the source. Here's a sample of the default output.
This command will get a list of all packages installed with `winget`. These will be packages with winget as the source. Here's a sample of the default output.

![installed](images/get-wginstalled.png)

Expand Down
2 changes: 1 addition & 1 deletion WingetTools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# Type files (.ps1xml) to be loaded when importing this module
TypesToProcess = @("types\wginstalled.types.ps1xml")
RequiredModules = @("ThreadJob","psyml")
RequiredModules = @("ThreadJob", "psyml")

FormatsToProcess = @(
'formats\wgpackage.format.ps1xml',
Expand Down
42 changes: 21 additions & 21 deletions docs/Get-WGPackage.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ This command is a PowerShell wrapper around winget.cmd that will get a package a
```powershell
PS C:\> Get-WGPackage -name "Foxit PDF Reader"
Name ID Version Description
---- -- ------- -----------
Foxit PDF Reader Foxit.FoxitReader 11.2.1.53537 Foxit is a powerful PDF reader
for viewing, filling out forms
and more.
Name ID Version Description
---- -- ------- -----------
Foxit PDF Reader Foxit.FoxitReader 12.0.1.12430 Foxit is a powerful PDF reader for viewing, filling out forms and more.
```

Get a package by its name.
Expand All @@ -62,20 +60,22 @@ Get a package by its name.
```powershell
PS C:\> Get-WGPackage -id "Microsoft.Powershell.Preview" | Select-Object *
Name : PowerShell Preview
ID : Microsoft.PowerShell.Preview
Version : 7.3.0.3
Publisher : Microsoft Corporation
Publisher URL : https://github.com/PowerShell/PowerShell
Publisher Support URL : https://github.com/PowerShell/PowerShell/issues
Author : Microsoft Corporation
Moniker : pwsh-preview
Description : PowerShell is a cross-platform (Windows, Linux, and
macOS) automation and configuration tool/framework that
works well with your existing tools and is optimized
for dealing with structured data (e.g. JSON, CSV, XML,
etc.), REST APIs, and object models.
Homepage : https://microsoft.com/PowerShell
Moniker : pwsh-preview
Description : PowerShell is a cross-platform Windows, Linux, and macOS
automation and configuration tool/frame work that works
well with your existing tools and is optimized for
dealing with structured data e.g. JSON, CSV, XML, etc.,
REST APIs, and object models.
Author : Microsoft Corporation
Publisher : Microsoft Corporation
PublisherUrl : https://github.com/PowerShell/PowerShell
PublisherSupportUrl : https://github.com/PowerShell/PowerShell/issues
Homepage : https://microsoft.com/PowerShell
Name : PowerShell Preview
ID : Microsoft.PowerShell.Preview
Version : 7.3.7.0
Source : winget
Computername : WIN11DESK
```

The output is a rich object.
Expand All @@ -88,8 +88,8 @@ PS C:\> winget search --tag powerbi | Get-WGPackage | Select-Object Name,ID,Vers
Name ID Version
---- -- -------
DAX Studio DaxStudio.DaxStudio 2.17.3.683
Microsoft PowerBI Desktop Microsoft.PowerBI 2.102.845.0
Microsoft PowerBI Desktop Microsoft.PowerBI 2.109.642.0
DAX Studio DaxStudio.DaxStudio 3.0.0.725
```

You can pipe the results of a winget search command to this function.
Expand Down
41 changes: 20 additions & 21 deletions docs/Get-WGUpgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@ Use this command to get information about available winget upgrades. You can the
```powershell
PS C:\> Get-WGUpgrade
Name ID Installed Available
---- -- --------- ---------
Visual Studio Community Microsoft.VisualStudio.2019.Community 16.11.10 16.11.17
2019
CCleaner Piriform.CCleaner 6.00 6.01
Discord Discord.Discord 1.0.9003 1.0.9005
Foxit PDF Reader Foxit.FoxitReader 12.0.0.12394 12.0.1.12430
Notepad++ Notepad++.Notepad++ 8.3.3 8.4.4
...
Name ID Installed Available
---- -- --------- ---------
Discord Discord.Discord 1.0.9005 1.0.9006
Visual Studio Community 2019 Microsoft.VisualStudio.2019.Community 16.11.18 16.11.19
Spotify Spotify.Spotify 1.1.91.824.g07f1e963 1.1.93.896.g3ae3b4f3
VSCodium VSCodium.VSCodium 1.71.1.22256 1.71.2.22258
Camtasia TechSmith.Camtasia 22.0.4.39133 22.1.1.39848
Windows Software Development Kit Microsoft.WindowsSDK 10.0.22000.832 10.0.22621.1
Microsoft SQL Server Management Studio Microsoft.SQLServerManagementStudio 18.12 18.12.1
PowerToys (Preview) Microsoft.PowerToys 0.62.0 0.62.1
ESET Endpoint Security ESET.EndpointSecurity 9.0.2046.0 9.1.2057.0
```

Get all available updates.
Expand All @@ -54,10 +56,9 @@ Get all available updates.
```powershell
PS C:\> get-wgupgrade p*
Name ID Installed Available
---- -- --------- ---------
PowerToys (Preview) Microsoft.PowerToys 0.58.0 0.61.1
Python 3 Python.Python.3 3.10.3 3.10.6
Name ID Installed Available
---- -- --------- ---------
PowerToys (Preview) Microsoft.PowerToys 0.62.0 0.62.1
```

Get upgrades with a name that begins with P.
Expand All @@ -67,14 +68,12 @@ Get upgrades with a name that begins with P.
```powershell
PS C:\> Get-WGUpgrade -id micro* | Select-Object Name,Version,Available
Name Version Available
---- ------- ---------
Visual Studio Community 2019 16.11.10 16.11.17
Microsoft Visual C++ 2015-2022 Redistributable (x86) 14.31.31103.0 14.32.31332.0
Microsoft .NET SDK 3.1 3.1.419 3.1.421
PowerToys (Preview) 0.58.0 0.61.1
Microsoft Visual C++ 2015-2022 Redistributable (x86) 14.32.31326.0 14.32.31332.0
Name Version Available
---- ------- ---------
Visual Studio Community 2019 16.11.18 16.11.19
Windows Software Development Kit 10.0.22000.832 10.0.22621.1
Microsoft SQL Server Management Studio 18.12 18.12.1
PowerToys (Preview) 0.62.0 0.62.1
```

Get upgrades by ID that starts with "micro". Note that the actual object property name, "Version", differs from the formatted column header of "Installed."
Expand Down
82 changes: 41 additions & 41 deletions en-US/WingetTools-help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,9 @@ Git.Git 2.37.1 2.37.1
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\&gt; Get-WGPackage -name "Foxit PDF Reader"

Name ID Version Description
---- -- ------- -----------
Foxit PDF Reader Foxit.FoxitReader 11.2.1.53537 Foxit is a powerful PDF reader
for viewing, filling out forms
and more.</dev:code>
Name ID Version Description
---- -- ------- -----------
Foxit PDF Reader Foxit.FoxitReader 12.0.1.12430 Foxit is a powerful PDF reader for viewing, filling out forms and more.</dev:code>
<dev:remarks>
<maml:para>Get a package by its name.</maml:para>
</dev:remarks>
Expand All @@ -355,20 +353,22 @@ Foxit PDF Reader Foxit.FoxitReader 11.2.1.53537 Foxit is a powerful PDF reader
<maml:title>-------------------------- Example 2 --------------------------</maml:title>
<dev:code>PS C:\&gt; Get-WGPackage -id "Microsoft.Powershell.Preview" | Select-Object *

Name : PowerShell Preview
ID : Microsoft.PowerShell.Preview
Version : 7.3.0.3
Publisher : Microsoft Corporation
Publisher URL : https://github.com/PowerShell/PowerShell
Publisher Support URL : https://github.com/PowerShell/PowerShell/issues
Author : Microsoft Corporation
Moniker : pwsh-preview
Description : PowerShell is a cross-platform (Windows, Linux, and
macOS) automation and configuration tool/framework that
works well with your existing tools and is optimized
for dealing with structured data (e.g. JSON, CSV, XML,
etc.), REST APIs, and object models.
Homepage : https://microsoft.com/PowerShell</dev:code>
Moniker : pwsh-preview
Description : PowerShell is a cross-platform Windows, Linux, and macOS
automation and configuration tool/frame work that works
well with your existing tools and is optimized for
dealing with structured data e.g. JSON, CSV, XML, etc.,
REST APIs, and object models.
Author : Microsoft Corporation
Publisher : Microsoft Corporation
PublisherUrl : https://github.com/PowerShell/PowerShell
PublisherSupportUrl : https://github.com/PowerShell/PowerShell/issues
Homepage : https://microsoft.com/PowerShell
Name : PowerShell Preview
ID : Microsoft.PowerShell.Preview
Version : 7.3.7.0
Source : winget
Computername : WIN11DESK</dev:code>
<dev:remarks>
<maml:para>The output is a rich object.</maml:para>
</dev:remarks>
Expand All @@ -380,8 +380,8 @@ Homepage : https://microsoft.com/PowerShell</dev:code>

Name ID Version
---- -- -------
DAX Studio DaxStudio.DaxStudio 2.17.3.683
Microsoft PowerBI Desktop Microsoft.PowerBI 2.102.845.0</dev:code>
Microsoft PowerBI Desktop Microsoft.PowerBI 2.109.642.0
DAX Studio DaxStudio.DaxStudio 3.0.0.725</dev:code>
<dev:remarks>
<maml:para>You can pipe the results of a winget search command to this function.</maml:para>
</dev:remarks>
Expand Down Expand Up @@ -759,15 +759,17 @@ Notes : This release is the first development build after the Windows
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\&gt; Get-WGUpgrade

Name ID Installed Available
---- -- --------- ---------
Visual Studio Community Microsoft.VisualStudio.2019.Community 16.11.10 16.11.17
2019
CCleaner Piriform.CCleaner 6.00 6.01
Discord Discord.Discord 1.0.9003 1.0.9005
Foxit PDF Reader Foxit.FoxitReader 12.0.0.12394 12.0.1.12430
Notepad++ Notepad++.Notepad++ 8.3.3 8.4.4
...</dev:code>
Name ID Installed Available
---- -- --------- ---------
Discord Discord.Discord 1.0.9005 1.0.9006
Visual Studio Community 2019 Microsoft.VisualStudio.2019.Community 16.11.18 16.11.19
Spotify Spotify.Spotify 1.1.91.824.g07f1e963 1.1.93.896.g3ae3b4f3
VSCodium VSCodium.VSCodium 1.71.1.22256 1.71.2.22258
Camtasia TechSmith.Camtasia 22.0.4.39133 22.1.1.39848
Windows Software Development Kit Microsoft.WindowsSDK 10.0.22000.832 10.0.22621.1
Microsoft SQL Server Management Studio Microsoft.SQLServerManagementStudio 18.12 18.12.1
PowerToys (Preview) Microsoft.PowerToys 0.62.0 0.62.1
ESET Endpoint Security ESET.EndpointSecurity 9.0.2046.0 9.1.2057.0</dev:code>
<dev:remarks>
<maml:para>Get all available updates.</maml:para>
</dev:remarks>
Expand All @@ -776,10 +778,9 @@ Notepad++ Notepad++.Notepad++ 8.3.3
<maml:title>-------------------------- Example 2 --------------------------</maml:title>
<dev:code>PS C:\&gt; get-wgupgrade p*

Name ID Installed Available
---- -- --------- ---------
PowerToys (Preview) Microsoft.PowerToys 0.58.0 0.61.1
Python 3 Python.Python.3 3.10.3 3.10.6</dev:code>
Name ID Installed Available
---- -- --------- ---------
PowerToys (Preview) Microsoft.PowerToys 0.62.0 0.62.1</dev:code>
<dev:remarks>
<maml:para>Get upgrades with a name that begins with P.</maml:para>
</dev:remarks>
Expand All @@ -788,13 +789,12 @@ Python 3 Python.Python.3 3.10.3
<maml:title>-------------------------- Example 3 --------------------------</maml:title>
<dev:code>PS C:\&gt; Get-WGUpgrade -id micro* | Select-Object Name,Version,Available

Name Version Available
---- ------- ---------
Visual Studio Community 2019 16.11.10 16.11.17
Microsoft Visual C++ 2015-2022 Redistributable (x86) 14.31.31103.0 14.32.31332.0
Microsoft .NET SDK 3.1 3.1.419 3.1.421
PowerToys (Preview) 0.58.0 0.61.1
Microsoft Visual C++ 2015-2022 Redistributable (x86) 14.32.31326.0 14.32.31332.0</dev:code>
Name Version Available
---- ------- ---------
Visual Studio Community 2019 16.11.18 16.11.19
Windows Software Development Kit 10.0.22000.832 10.0.22621.1
Microsoft SQL Server Management Studio 18.12 18.12.1
PowerToys (Preview) 0.62.0 0.62.1</dev:code>
<dev:remarks>
<maml:para>Get upgrades by ID that starts with "micro". Note that the actual object property name, "Version", differs from the formatted column header of "Installed."</maml:para>
</dev:remarks>
Expand Down
Loading

0 comments on commit 54c813a

Please sign in to comment.