From 58bf86c706c5a442da4fb01ea26e06f1ed291d45 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 5 Jan 2025 19:48:25 +0100 Subject: checkpoint --- bin/extra/p.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin/extra/p.sh') diff --git a/bin/extra/p.sh b/bin/extra/p.sh index 98f8ede..e33f5ba 100755 --- a/bin/extra/p.sh +++ b/bin/extra/p.sh @@ -661,14 +661,17 @@ html="/tmp/pk_tmp.html" [ "$pokemon" ] || pokemon="$(ask_pokemon)" [ "$pokemon" ] || exit 1 -case "$1" in +choice="$(printf 'evolution\nmoves\nstats\n' | commander -c -w 3)" +[ "$choice" ] || exit 1 + +case "$choice" in # evolution e*) url="https://pokemondb.net/pokedex/$pokemon" curl -Ls "$url" > "$html" level1="$(pup -p 'span.infocard:nth-child(2) > small:nth-child(2) text{}' < "$html")" level2="$(pup -p 'span.infocard:nth-child(4) > small:nth-child(2) text{}' < "$html")" - notify-send "p.sh" "$level1\n$level2" + herbe "p.sh" "$level1" "$level2" & ;; # moves @@ -676,7 +679,4 @@ case "$1" in # stats s*) $BROWSER "https://www.smogon.com/dex/bw/pokemon/$pokemon/" ;; - *) - choice="$(printf 'evolution\nmoves\nstats\n' | commander -c -w 3)" - [ "$choice" ] && pokemon="$pokemon" $0 "$choice" ;; esac -- cgit v1.2.3