Skip to content

Commit

Permalink
Add groups to index pages
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkwouter committed Jun 25, 2024
1 parent 4983017 commit 54edac6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.zip
*.bz2
__pycache__/
repo/

# do allow github workflow files
!.github/workflows/
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<body>
<p><h1>${GITHUB_REPOSITORY_OWNER}&#39;s package index</h1></p>
<table>
<tr><th>Name</th><th>Version</th><th>Description</th><th>Last Updated</th></tr>
<tr><th>Name</th><th>Version</th><th>Description</th><th>Groups</th><th>Last Updated</th></tr>
${INDEX_TABLE_CONTENT}
</table>
<p>Source on <a href="https://github.com/${GITHUB_REPOSITORY}/">GitHub</a></p>
Expand Down
4 changes: 3 additions & 1 deletion make-repo-html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#Change directory to the directory of this script
cd "$(dirname "$0")"
mkdir -p repo

# Export all variables
set -a
Expand All @@ -23,6 +24,7 @@ for PSPBUILD in $(find . -name "PSPBUILD" | sort); do
# Convert lists to strings
ARCH="${arch[*]}"
LICENSE="${license[*]}"
GROUP_LIST="${groups[*]}"

# Get file size info
FILENAME="repo/${DOWNLOAD_URL}"
Expand Down Expand Up @@ -55,7 +57,7 @@ for PSPBUILD in $(find . -name "PSPBUILD" | sort); do

envsubst < package.html > "repo/${pkgname}.html"

INDEX_TABLE_CONTENT="${INDEX_TABLE_CONTENT}<tr><td><a href=\"${pkgname}.html\">${pkgname}</a></td><td>${pkgver}-${pkgrel}</td><td>${pkgdesc}</td><td>${UPDATED}</td></tr>"
INDEX_TABLE_CONTENT="${INDEX_TABLE_CONTENT}<tr><td><a href=\"${pkgname}.html\">${pkgname}</a></td><td>${pkgver}-${pkgrel}</td><td>${pkgdesc}</td><td>${GROUP_LIST}</td><td>${UPDATED}</td></tr>"
done

envsubst < index.html > repo/index.html
Expand Down
1 change: 1 addition & 0 deletions package.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<b>Description:</b> ${pkgdesc}</br>
<b>Upstream URL:</b> <a href="${url}">${url}</a></br>
<b>License:</b> ${LICENSE}</br>
<b>Groups:</b> ${GROUP_LIST}</br>
<b>Last Updated:</b> ${UPDATED}</br>
<b>Package Size:</b> ${PKGSIZE}</br>
<b>Installed Size:</b> ${INSTSIZE}</br>
Expand Down

0 comments on commit 54edac6

Please sign in to comment.