diff options
-rwxr-xr-x | repology | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -5,6 +5,8 @@ # Author: B. Watson (yalhcru at gmail) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# https://repology.org//projects/?maintainer=urchlay@slackware.uk&inrepo=slackbuilds&outdated=1 + . surfraw || exit 1 w3_usage_hook() { @@ -15,6 +17,7 @@ Description: Local options: -p,-pkg,-package Search package names -m,-maint Search maintainers by email address + -o,-outdated Search for outdated packages, by email address By default, if there's an @ in the search term, a maintainer search is done, otherwise a package search. EOF @@ -25,8 +28,9 @@ w3_parse_option_hook() { opt="$1" optarg="$2" case "$opt" in - -p|-pkg|-pac*) repo_target="/projects/" ;; - -m|-main*) repo_target="/maintainers/" ;; + -p|-pkg|-pac*) repo_target="/projects/" ;; + -m|-main*) repo_target="/maintainers/" ;; + -o|-outdated*) repo_target="/projects/" ; O=1 ;; *) return 1 ;; esac return 0 @@ -40,5 +44,10 @@ w3_parse_args "$@" *) repo_target="/projects/" ;; esac -url="https://repology.org/${repo_target}?search=$( w3_url_of_arg $w3_args )"; +if [ "$O" = "1" ]; then + [ "$w3_args" = "" ] && w3_args="urchlay@slackware.uk" + url="https://repology.org/${repo_target}?maintainer=$( w3_url_of_arg $w3_args )&outdated=1"; +else + url="https://repology.org/${repo_target}?search=$( w3_url_of_arg $w3_args )"; +fi w3_browse_url "$url" |