Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio committed Dec 2, 2024
1 parent 63615e8 commit e9408ad
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 21 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
<div align="center">

[![logo](src/img/logo-b.png)](https://github.com/ipitio/backage)
[![logo](src/img/logo-b.webp)](https://github.com/ipitio/backage)

# [backage](https://github.com/ipitio/backage)

**It's all part and parcel**

---

[![build](https://github.com/ipitio/backage/actions/workflows/publish.yml/badge.svg)](https://github.com/ipitio/backage/pkgs/container/backage) [![packages](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Fipitio%2Fbackage%2Fraw%2Findex%2F.json&query=%24.packages&logo=github&logoColor=959da5&label=packages&labelColor=333a41&color=2ebc4f)](https://github.com/ipitio/backage/tree/index) [![date](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Fipitio%2Fbackage%2Fraw%2Findex%2F.json&query=%24.date&logo=github&logoColor=959da5&label=refreshed&labelColor=333a41&color=2ebc4f)](https://github.com/ipitio/backage/releases/latest)
[![build](https://github.com/ipitio/backage/actions/workflows/publish.yml/badge.svg)](https://github.com/ipitio/backage/pkgs/container/backage) [![builds](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fipitio.github.io%2Fbackage%2Fipitio%2Fbackage%2Fbackage.json&query=%24.downloads&logo=github&logoColor=959da5&label=builds&labelColor=333a41)](https://github.com/ipitio/backage/releases/latest)
[![built](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Fipitio%2Fbackage%2Fraw%2Findex%2F.json&query=%24.date&logo=github&logoColor=959da5&label=built&labelColor=333a41&color=purple)](https://github.com/ipitio/backage/releases/latest) [![packages](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Fipitio%2Fbackage%2Fraw%2Findex%2F.json&query=%24.packages&logo=github&logoColor=959da5&label=packages&labelColor=333a41&color=grey)](https://github.com/ipitio/backage/tree/index)

</div>

The GitHub Packages API doesn't expose much of the publicly-available metadata that other registries provide. This completely automated closed-loop system [is the solution](https://github.com/badges/shields/issues/5594#issuecomment-2157626147). **Just star this project to have GitHub supplement its API with an additional endpoint for your public packages!**
Wish you could show npm, gem, mvn, Gradle, NuGet, or GHCR badges? Tough luck; the GitHub Packages API has never exposed the publicly-available metadata that other registries provide, like pulls... That is, until now: **Just star this project to have GitHub supplement its API with an additional endpoint for your public packages!**

A service ran by GitHub will add them to its circular priority queue within the next few hours and update the [dataset](https://github.com/ipitio/backage/releases/latest). If you'd then like the service to forget and ignore some or all of your packages, add `owner[/repo[/package]]` to `optout.txt` [here](https://github.com/ipitio/backage/edit/master/optout.txt) and make a pull request.
A service ran by GitHub will add them to its circular priority queue within the next few hours and update the [closed-loop system](https://github.com/ipitio/backage/releases/latest). If you'd then like the service to forget and ignore some or all of your packages, add `owner[/repo[/package]]` to `optout.txt` [here](https://github.com/ipitio/backage/edit/master/optout.txt) and make a pull request.

To add any other users or organizations not yet [in the index](https://github.com/ipitio/backage/tree/index), add the case-sensitive name of each one on a new line in `owners.txt` on your own fork [here](https://github.com/ipitio/backage/edit/master/owners.txt) and make a pull request. Please add just the name(s) -- ids, repos, and packages will be found automatically!

Expand All @@ -28,7 +29,7 @@ To add any other users or organizations not yet [in the index](https://github.co
https://ipitio.github.io/backage/OWNER/REPO/PACKAGE.FORMAT
```

Use something like [shields.io/json](https://shields.io/badges/dynamic-json-badge) or [shields.io/xml](https://shields.io/badges/dynamic-xml-badge) with this endpoint to access the latest data and make badges like the ones above. Replace `OWNER/REPO/PACKAGE.FORMAT` with their respective values.
Replace `OWNER/REPO/PACKAGE.FORMAT` with their respective values, then use something like [shields.io/json](https://shields.io/badges/dynamic-json-badge) or [shields.io/xml](https://shields.io/badges/dynamic-xml-badge) to access the latest data and make badges like `refreshes` above or the one [here](https://github.com/badges/shields/issues/5594#issuecomment-2157626147).

> [!NOTE]
> The format can be either `json` or `xml`. You'll need the XML endpoint to evaluate expressions, like filters, with Shields -- see [this issue](https://github.com/ipitio/backage/issues/23).
Expand Down Expand Up @@ -129,21 +130,21 @@ $.version[?(@.latest)].tags[?(@!="latest")]
You can query a package for its properties, like size or version:
```py
/bkg/PROPERTY
/xml/PROPERTY
```
```py
/bkg/size
/xml/size
```
Versions can be filtered in and tags out:
```py
/bkg/version[FILTER]/PROPERTY
/xml/version[FILTER]/PROPERTY
```
```py
/bkg/version[./latest[.="true"]]/tags[.!="latest"]
/xml/version[./latest[.="true"]]/tags[.!="latest"]
```
</details>
Expand Down
4 changes: 2 additions & 2 deletions src/bkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ main() {
sed -i '/^BKG_VERSIONS_.*=/d; /^BKG_PACKAGES_.*=/d; /^BKG_OWNERS_.*=/d; /^BKG_TIMEOUT=/d' "$BKG_ENV"
\cp "$BKG_ROOT"/README.md "$BKG_INDEX_DIR"/README.md
# shellcheck disable=SC2016
sed -i 's/src\/img\/logo-b.png/logo-b.png/g; s/```py/```prolog/g; s/```js/```jboss-cli/g' "$BKG_INDEX_DIR"/README.md
\cp img/logo-b.png "$BKG_INDEX_DIR"/logo-b.png
sed -i 's/src\/img\/logo-b.webp/logo-b.webp/g; s/```py/```prolog/g; s/```js/```jboss-cli/g' "$BKG_INDEX_DIR"/README.md
\cp img/logo-b.webp "$BKG_INDEX_DIR"/logo-b.webp
\cp img/logo.ico "$BKG_INDEX_DIR"/favicon.ico
\cp templates/.index.html "$BKG_INDEX_DIR"/index.html
\cp templates/fxp.min.js "$BKG_INDEX_DIR"/fxp.min.js
Expand Down
Binary file removed src/img/logo-a.png
Binary file not shown.
Binary file added src/img/logo-a.webp
Binary file not shown.
Binary file removed src/img/logo-b.png
Binary file not shown.
Binary file added src/img/logo-b.webp
Binary file not shown.
Binary file removed src/img/logo.png
Binary file not shown.
Binary file added src/img/logo.webp
Binary file not shown.
21 changes: 11 additions & 10 deletions src/templates/.README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<div align="center">

[![logo](src/img/logo-b.png)](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>)
[![logo](src/img/logo-b.webp)](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>)

# [<GITHUB_REPO>](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>)

**It's all part and parcel**

---

[![build](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>/actions/workflows/publish.yml/badge.svg)](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>/pkgs/container/<GITHUB_REPO>) [![packages](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2F<GITHUB_OWNER>%2F<GITHUB_REPO>%2Fraw%2Findex%2F.json&query=%24.packages&logo=github&logoColor=959da5&label=packages&labelColor=333a41&color=2ebc4f)](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>/tree/index) [![date](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2F<GITHUB_OWNER>%2F<GITHUB_REPO>%2Fraw%2Findex%2F.json&query=%24.date&logo=github&logoColor=959da5&label=refreshed&labelColor=333a41&color=2ebc4f)](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>/releases/latest)
[![build](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>/actions/workflows/publish.yml/badge.svg)](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>/pkgs/container/<GITHUB_REPO>) [![builds](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2F<GITHUB_OWNER>.github.io%2F<GITHUB_REPO>%2F<GITHUB_OWNER>%2F<GITHUB_REPO>%2F<GITHUB_REPO>.json&query=%24.downloads&logo=github&logoColor=959da5&label=builds&labelColor=333a41)](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>/releases/latest)
[![built](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2F<GITHUB_OWNER>%2F<GITHUB_REPO>%2Fraw%2Findex%2F.json&query=%24.date&logo=github&logoColor=959da5&label=built&labelColor=333a41&color=purple)](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>/releases/latest) [![packages](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2F<GITHUB_OWNER>%2F<GITHUB_REPO>%2Fraw%2Findex%2F.json&query=%24.packages&logo=github&logoColor=959da5&label=packages&labelColor=333a41&color=grey)](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>/tree/index)

</div>

The GitHub Packages API doesn't expose much of the publicly-available metadata that other registries provide. This completely automated closed-loop system [is the solution](https://github.com/badges/shields/issues/5594#issuecomment-2157626147). **Just star this project to have GitHub supplement its API with an additional endpoint for your public packages!**
Wish you could show npm, gem, mvn, Gradle, NuGet, or GHCR badges? Tough luck; the GitHub Packages API has never exposed the publicly-available metadata that other registries provide, like pulls... That is, until now: **Just star this project to have GitHub supplement its API with an additional endpoint for your public packages!**

A service ran by GitHub will add them to its circular priority queue within the next few hours and update the [dataset](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>/releases/latest). If you'd then like the service to forget and ignore some or all of your packages, add `owner[/repo[/package]]` to `optout.txt` [here](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>/edit/<GITHUB_BRANCH>/optout.txt) and make a pull request.
A service ran by GitHub will add them to its circular priority queue within the next few hours and update the [closed-loop system](https://github.com/ipitio/backage/releases/latest). If you'd then like the service to forget and ignore some or all of your packages, add `owner[/repo[/package]]` to `optout.txt` [here](https://github.com/ipitio/backage/edit/master/optout.txt) and make a pull request.

To add any other users or organizations not yet [in the index](https://github.com/<GITHUB_OWNER>/<GITHUB_REPO>/tree/index), add the case-sensitive name of each one on a new line in `owners.txt` on your own fork [here](https://github.com/ipitio/backage/edit/master/owners.txt) and make a pull request. Please add just the name(s) -- ids, repos, and packages will be found automatically!
To add any other users or organizations not yet [in the index](https://github.com/ipitio/backage/tree/index), add the case-sensitive name of each one on a new line in `owners.txt` on your own fork [here](https://github.com/ipitio/backage/edit/master/owners.txt) and make a pull request. Please add just the name(s) -- ids, repos, and packages will be found automatically!

<div align="center">

Expand All @@ -28,7 +29,7 @@ To add any other users or organizations not yet [in the index](https://github.co
https://<GITHUB_OWNER>.github.io/<GITHUB_REPO>/OWNER/REPO/PACKAGE.FORMAT
```

Use something like [shields.io/json](https://shields.io/badges/dynamic-json-badge) or [shields.io/xml](https://shields.io/badges/dynamic-xml-badge) with this endpoint to access the latest data and make badges like the ones above. Replace `OWNER/REPO/PACKAGE.FORMAT` with their respective values.
Replace `OWNER/REPO/PACKAGE.FORMAT` with their respective values, then use something like [shields.io/json](https://shields.io/badges/dynamic-json-badge) or [shields.io/xml](https://shields.io/badges/dynamic-xml-badge) to access the latest data and make badges like `refreshes` above or the one [here](https://github.com/badges/shields/issues/5594#issuecomment-2157626147).

> [!NOTE]
> The format can be either `json` or `xml`. You'll need the XML endpoint to evaluate expressions, like filters, with Shields -- see [this issue](https://github.com/ipitio/backage/issues/23).
Expand Down Expand Up @@ -129,21 +130,21 @@ $.version[?(@.latest)].tags[?(@!="latest")]
You can query a package for its properties, like size or version:
```py
/bkg/PROPERTY
/xml/PROPERTY
```
```py
/bkg/size
/xml/size
```
Versions can be filtered in and tags out:
```py
/bkg/version[FILTER]/PROPERTY
/xml/version[FILTER]/PROPERTY
```
```py
/bkg/version[./latest[.="true"]]/tags[.!="latest"]
/xml/version[./latest[.="true"]]/tags[.!="latest"]
```
</details>
Expand Down

0 comments on commit e9408ad

Please sign in to comment.