Add support for winget and chocolatey package counts on Windows #182
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #181
Chocolatey package count is very straight forward, as it just counts the directories under
C:\ProgramData\chocolatey\lib
, which is consistent withchocolatey list
.For winget, I made use of an sqlite3 database under
C:\Users\Username\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db
, that contains a tableids
with entries for each package that is explicitly installed withwinget
.winget list
lists a bunch more packages as installed bywinget
, e.g.Microsoft OneDrive
andCortana
, but since those were not installed by the user using winget and those packages that were, are included, I think this is good as is.Nevertheless, feedback by @Un1q32 or @Kodehawa from Gobidev/pfetch-rs#69 for this is welcome.