Added quick view
This commit is contained in:
parent
f00c96479b
commit
233ac28449
11
pokedex
11
pokedex
|
@ -6,7 +6,7 @@ help() {
|
|||
echo -e "Can optionally search by name"
|
||||
echo -e "EXAMPLE\n\tpokedex [pokemon name]\n"
|
||||
echo -e "OPTIONS"
|
||||
echo -e "\t-u, --update [N/+N/-N/N%]\n\t\tScrape web for updated Pokemon stats\n\t\tWARNING: update function is resource heavy\n\t\tSee Parallel job control (-j) for options\n\t\tDefault is 200%\n\t-h, --help\n\t\tPrint this help screen"
|
||||
echo -e "\t-q, --quick [pokemon]\n\t\tPrints single pokedex entry to terminal\n\t-u, --update [N/+N/-N/N%]\n\t\tScrape web for updated Pokemon stats\n\t\tWARNING: update function is resource heavy\n\t\tSee Parallel job control (-j) for options\n\t\tDefault is 200%\n\t-h, --help\n\t\tPrint this help screen"
|
||||
echo -e "KEYBINDS"
|
||||
echo -e "\tctrl-n\tShows small sprite version\n\tctrl-b\tShows large sprite version\n\tctrl-s\tShows shiny sprite version\n\tctrl-h\tShows this help screen in preview window\n"
|
||||
}
|
||||
|
@ -40,6 +40,12 @@ pokedex() {
|
|||
parallel pokemon-colorscripts --no-title -n {} "&&" cat "$POKEDATA"{}
|
||||
}
|
||||
|
||||
|
||||
### Quick view returns single Pokemon stat instead of opening pokedex
|
||||
quick_view() {
|
||||
echo "$1" | parallel pokemon-colorscripts --no-title -n {} "&&" cat "$POKEDATA{}"
|
||||
}
|
||||
|
||||
### Update Pokemon stats file set
|
||||
update_pokeData() {
|
||||
echo -e "\n\t\tWARNING!!!\n\tThis WILL take a long time\n"
|
||||
|
@ -55,6 +61,9 @@ if [[ ! "$1" =~ ^- ]]; then
|
|||
else
|
||||
for opt in "$@"; do
|
||||
case $opt in
|
||||
-q|--quick)
|
||||
quick_view "$2"
|
||||
;;
|
||||
-u|--update)
|
||||
update_pokeData "$2"
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue