-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate repository index pages #155
Comments
This would kind of fit to my idea to switch to github-pages for hosting packages instead of doing endless releases. |
Okay, we've now transitioned to hosting on GitHub Pages, so we could integrate this now. It would have to be a solution that spits out static html, though. We cannot host a back-end on GitHub Pages. |
Here is my initial take on it: #!/bin/bash
PSPBUILD_LIST=$(find . -name "PSPBUILD" | sort)
echo "| Name | Version | Description | Last Updated |"
echo "|------|---------|-------------|--------------|"
for PSPBUILD in $PSPBUILD_LIST;
do
source "${PSPBUILD}"
UPDATED=$(git log -1 --format=%cd --date=short -- "${PSPBUILD}")
echo "| ${pkgname} | ${pkgver}-${pkgrel} | ${pkgdesc} | ${UPDATED} |"
done It outputs markdown, but it can easily be modified (or postprocessed) for HTML output. Here is an example output:
|
That looks pretty good. I think I'd convert it to an html table. Then we can use |
This should work: #!/bin/bash
PSPBUILD_LIST=$(find . -name "PSPBUILD" | sort)
echo "<table>"
echo "<tr><th>Name</th><th>Version</th><th>Description</th><th>Last Updated</th></tr>"
for PSPBUILD in $PSPBUILD_LIST;
do
source "${PSPBUILD}"
UPDATED=$(git log -1 --format=%cd --date=short -- "${PSPBUILD}")
URL="${pkgname}-${pkgver}-${pkgrel}-${arch}.pkg.tar.gz"
echo "<tr><td><a href=\"${URL}\">${pkgname}</a></td><td>${pkgver}-${pkgrel}</td><td>${pkgdesc}</td><td>${UPDATED}</td></tr>"
done
echo "</table>" |
Looks neat. Instead of linking directly to the packages, I would prefer to generate individual pages for each package. This is what I came up with so far (mostly mimicking arch linux package pages): package_page() {
echo "# ${pkgname} ${pkgver}-${pkgrel}"
echo "Architecture: ${arch}"
echo "Description: ${pkgdesc}"
echo "Upstream URL: ${url}"
echo "License: ${license}"
FILENAME="${pkgname}/${pkgname}-${pkgver}-${pkgrel}-${arch}.pkg.tar.gz"
GZSTATS="$(gzip -l $FILENAME | tail -n 1 | tr -s ' ')"
PKGSIZE=$(echo $GZSTATS | cut -d ' ' -f 1 | numfmt --to=iec --suffix=B --format="%.2f")
INSTSIZE=$(echo $GZSTATS | cut -d ' ' -f 2 | numfmt --to=iec --suffix=B --format="%.2f")
echo "Package Size: ${PKGSIZE}"
echo "Installed Size: ${INSTSIZE}"
echo "## Dependencies"
for DEP in $depends; do
echo "- ${DEP}"
done
CONTENTS=$(tar tzf $FILENAME | grep -v '\.BUILDINFO\|\.MTREE\|\.PKGINFO')
echo "## Package Contents"
for FILE in $CONTENTS; do
echo "- ${FILE}"
done
} |
@sharkwouter maybe add a link to the index page to the repo description which says "No description, website, or topics provided." now? |
@fjtrujy could you add the link to https://pspdev.github.io/psp-packages/ to the about part of the GitHub repo? I don't have the right to do so |
This has now been added, thanks @fjtrujy! |
Anytime! |
Perhaps a simple table listing all the packages can be generated similar to https://archlinux.org/packages/
Every package can have it's own page like this: https://archlinux.org/packages/extra/x86_64/ppsspp/
Since psp-packages is so much smaller than ArchLinux, the pages can be much simpler. For the table we can only keep "Name", "Version", "Description", "Last Updated".
The text was updated successfully, but these errors were encountered: