From 4b1a6ef78bd9857e915d2c1600fbbc89ebeb1b1e Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 17 Jun 2021 01:45:01 -0300 Subject: scripts/paku: Generate paku.html --- .gitignore | 1 + Makefile | 12 ++++--- README.md | 4 +-- paku.json | 15 +++++--- scripts/paku | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 136 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index cd0aa9d..c983e96 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /public/ /dependencies.svg +/paku.html diff --git a/Makefile b/Makefile index 10f1c8e..7c786cc 100644 --- a/Makefile +++ b/Makefile @@ -24,12 +24,16 @@ check: dev-check: check clean: - rm -rf public/ dependencies.svg + rm -rf public/ dependencies.svg paku.html dependencies.svg: dependencies.dot dot dependencies.dot -Tsvg > dependencies.svg -public: README.md TODOs.md dependencies.svg +paku.html: paku.json + sh scripts/paku -l + +public: README.md TODOs.md dependencies.svg paku.html sh aux/workflow/public.sh "EuAndreh's package repository" $(NAME) $(MAILING_LIST) - cp EuAndreh.key public/ - cp dependencies.svg public/ + for f in EuAndreh.key dependencies.svg paku.html; do \ + cp $$f public/; \ + done diff --git a/README.md b/README.md index c5d7d7c..2a99a04 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ Personal package repository for a variety of operating systems, mainly for packaging personal projects of mine and make it available for users and packagers. -See the list of packages in [`paku.json`]. +See the list of packages [online]. -[`paku.json`]: https://git.euandreh.xyz/package-repository/tree/paku.json +[online]: https://euandreh.xyz/package-repository/paku.html ## How to add this to different OSes diff --git a/paku.json b/paku.json index 30ada98..1607d53 100644 --- a/paku.json +++ b/paku.json @@ -4,19 +4,22 @@ "name": "remembering", "suffix": "-latest", "version": "5476f9fab45efd3996d50d8b9a1ff4e825d93f44", - "type": "bin" + "type": "bin", + "description": "Add memory to dmenu, fzf and similar tools." }, { "name": "remembering", "suffix": "", "version": "0.2.1", - "type": "bin" + "type": "bin", + "description": "Add memory to dmenu, fzf and similar tools." }, { "name": "autoqemu", "suffix": "-latest", "version": "e676c0baedc09f34fbd07877dc3ab47e9427a221", - "type": "bin" + "type": "bin", + "description": "Installation and setup automation tool for QEMU virtual machines" }, { "name": "fallible", @@ -25,7 +28,8 @@ "type": "lib", "check_inputs": [ "valgrind" - ] + ], + "description": "Fault injection library for stress-testing failure scenarios" }, { "name": "fallible", @@ -34,7 +38,8 @@ "type": "lib", "check_inputs": [ "valgrind" - ] + ], + "description": "Fault injection library for stress-testing failure scenarios" } ] } diff --git a/scripts/paku b/scripts/paku index 3c9e793..939db80 100755 --- a/scripts/paku +++ b/scripts/paku @@ -232,12 +232,123 @@ refresh_packages() { else NEW_VERSION="$(git describe --tags --abbrev=0 | cut -c2-)" fi + DESCRIPTION="$(cat description)" cd - >/dev/null jq -r ".packages[$N].version = \"$NEW_VERSION\"" paku.json | sponge paku.json + jq -r ".packages[$N].description = \"$DESCRIPTION\"" paku.json | sponge paku.json done } -while getopts 'gr' flag; do +report_index() { + cat < paku.html + + + + + + + Package index + + + + +

+ Package index +

+ + + +EOF +} + +while getopts 'grl' flag; do case "$flag" in g) gen_guix @@ -247,6 +358,9 @@ while getopts 'gr' flag; do r) refresh_packages ;; + l) + report_index + ;; *) printf 'Unrecognized flag "%s".\n' "$flag" >&2 ;; -- cgit v1.2.3