cookutils rev 1080
lighttpd/index.cgi: add Repology badges
Use variable $REPOLOGY in the receipts when our package names don't match Repology's metapackages names.
For example, in "gtk+" receipt specify "gtk2"; and in "gtk+3" receipt - "gtk3".
Use variable $REPOLOGY in the receipts when our package names don't match Repology's metapackages names.
For example, in "gtk+" receipt specify "gtk2"; and in "gtk+3" receipt - "gtk3".
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Jul 10 10:30:03 2018 +0300 (2018-07-10) |
parents | 64c16be1dda4 |
children | 8683bf3e7c02 |
files | lighttpd/index.cgi |
line diff
1.1 --- a/lighttpd/index.cgi Tue Jul 10 10:25:36 2018 +0300 1.2 +++ b/lighttpd/index.cgi Tue Jul 10 10:30:03 2018 +0300 1.3 @@ -1260,6 +1260,19 @@ 1.4 summary "$log" 1.5 1.6 1.7 + # Repology badge 1.8 + [ "$REPOLOGY" == '-' ] || cat <<EOT 1.9 +<section> 1.10 + <h3>Repology</h3> 1.11 + <a href="https://repology.org/metapackage/${REPOLOGY:-$pkg}" target='_blank' 1.12 + rel='noopener noreferrer' title="latest packaged version(s) by Repology"> 1.13 + <img src="https://repology.org/badge/latest-versions/${REPOLOGY:-$pkg}.svg" alt="latest packaged version(s)"> 1.14 + <img src="https://repology.org/badge/tiny-repos/${REPOLOGY:-$pkg}.svg" alt="Packaging status"> 1.15 + </a> 1.16 +</section> 1.17 +EOT 1.18 + 1.19 + 1.20 # Show tag list 1.21 taglist=$( 1.22 for i in $pkg $(awk -F$'\t' -vp="$pkg" '{if ($1 == p) print $2}' $splitdb); do