Add Winget in Third Party Packages#207
Add Winget in Third Party Packages#207ReenigneArcher merged 6 commits intoLizardByte:nightlyfrom sitiom:patch-1
Conversation
ReenigneArcher
left a comment
There was a problem hiding this comment.
Some issues with this...
- Is not in alphabetical order.
- It's ugly.
Advanced example
.. image:: https://img.shields.io/static/v1?style=for-the-badge&label=Feature+Upvote&message=Request&color=important&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIKSURBVDhPnZM9aFNRFIDPeWkFlw5uEW3TqojiYqIO71GHSPOGdlNxEgRBEXGTIhkK/g6hKHQQzFYquOggRfFlKAjmKcLLoqIOXRQMqDh0kSrN9Tt58RkERXvg45577/m9Pyq/SSkIdzjnTqEeglHowDI0RLTeiqN36JlkAXAcwPES6nkYgJfwBsxmD+yEVbjIUo1AFjgNgHMO5zuoR+Ghqk4nzeiV7f0UbErYXEc9CLdU9EwSRy5nm/mt26oM5+AGMU8Q/WPRDz3WZ8HfvGXscRI3PuSHt9/GZgROQrv9fjlRIueJbD0+JfMEmTvmLOLqPUOTGhkvWMaiXxlk/gwK2I96OB9nspHM1a5zUDHnm6yZs+sx7cRdYZRW3PjOMAOb8D2CsZSBk3XP9wehYj7H/DTMw2uI4T5UqYwDRFS5EVmBsgUowFsiuzWRcfSzQK9qFdhJf6PUY4wPSDJDy7tbzciqsLbHLEAm6iTGeErVs4MkXiq0tkrWw+xNdtyaVZWJciiPGHdBwarorvaEvRcMn1i3NjMp+eEgZ/IZddEqWIJhYh2wzX8RslQYhmDJ43oWUL6yfG1fYNf3dykG4QZsL6N+oaW7HnfbZnIVyh0ns5Td/z/uwWKqps9dXPd97AW79pX0KfuVHGX931P2eMpPIreuz6QqtaTZ+PWZ+oVAf/zOVFansr7vLPIDh9/cyYgVQMYAAAAASUVORK5CYII=
:alt: Feature Upvote
:target: https://retroarcher.github.io/featurereq/You need to encode the image to base 64 (google how to do this, there are online converters). Use this image, from their github: https://avatars.githubusercontent.com/u/6154722?s=200&v=4
You can change the size of the image in the url by changing the 200. The encoded image must be below a certain size for it to render properly.
Alternatively use the named logo microsoft
I'd rather the styling match than it show the version number, although you can also do a query to get the version number.
https://api.github.com/repos/microsoft/winget-pkgs/contents/manifests/s/SunshineStream/Sunshine
Here are examples using the json query: https://github.com/SunshineStream/Sunshine/blob/master/docs/source/contributing/localization.rst
So let's take what we know and make it into a proper shield.
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=Winget&style=for-the-badge&query=0.name&url=https%3A%2F%2Fapi.github.com%2Frepos%2Fmicrosoft%2Fwinget-pkgs%2Fcontents%2Fmanifests%2Fs%2FSunshineStream%2FSunshine&logo=microsoft
:alt: Winget Version
:target: https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/SunshineStream/Sunshine|
While you're at it... how about adding something in the docs about GitHub etiquette? You can link people to this article. https://developer.mozilla.org/en-US/docs/MDN/Contribute/Open_source_etiquette |
The problem with using this is that the results are alphabetically arranged. Let's take another this example (https://api.github.com/repos/microsoft/winget-pkgs/contents/manifests/s/Sandboxie/Plus):
How about adding this in a separate PR? I don't like to jam-pack unrelated changes in a single PR. |
|
Any idea where is the built in search querying data from? https://docs.microsoft.com/en-us/windows/package-manager/winget/search
This is hardly a "jam-packed" pr, and it's certainly related. This is just a documentation update, and quite a small one. |
A database inside I finally got it however, I just had to scrape from Repology. URL: https://repology.org/project/sunshine/versions Query: Added .. image:: https://img.shields.io/badge/dynamic/xml?color=blue&label=Winget&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27winget%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=microsoft
:alt: Winget Version
:target: https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/SunshineStream/SunshineExample with Firefox (properly returning the latest version): |

Description
Not too sure about the badge, shields.io does not support Winget yet (badges/shields#5548),
so I just used the Repology badge. This would make the styling inconsistent from the other ones, not sure how to solve that.Screenshot
Type of Change
Checklist