added help
This commit is contained in:
parent
6e297d9638
commit
24de6c8e26
|
@ -1,5 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
### Help
|
||||||
|
Help() {
|
||||||
|
echo -e "\nUse fzf to search and Pokemon stats\n"
|
||||||
|
echo -e "Can optionally search by name"
|
||||||
|
echo -e "EXAMPLE\n\tfuzzy-pokedex [pokemon name]\n"
|
||||||
|
echo -e "OPTIONS"
|
||||||
|
echo -e "\t-u, --update\n\t\tScrape web for updated Pokemon stats\n\t\tWARNING: update function is resource heavy\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"
|
||||||
|
}
|
||||||
|
|
||||||
|
### Pokedex viewer using pokemon-colorscripts and fzf
|
||||||
pokedex() {
|
pokedex() {
|
||||||
pokemon-colorscripts -l |
|
pokemon-colorscripts -l |
|
||||||
fzf +m -s -i \
|
fzf +m -s -i \
|
||||||
|
@ -18,13 +30,14 @@ pokedex() {
|
||||||
--preview="echo; pokemon-colorscripts -n {1} --no-title; cat /home/ez/Git/fuzzy-pokedex/pokeData/{1}" \
|
--preview="echo; pokemon-colorscripts -n {1} --no-title; cat /home/ez/Git/fuzzy-pokedex/pokeData/{1}" \
|
||||||
--preview-window=68%:wrap:border-rounded \
|
--preview-window=68%:wrap:border-rounded \
|
||||||
--bind=focus:transform-preview-label:'echo [ {1} ] ' \
|
--bind=focus:transform-preview-label:'echo [ {1} ] ' \
|
||||||
|
--bind=ctrl-h:preview:'echo; ./fuzzy-pokedex -h;' \
|
||||||
--bind=ctrl-b:preview:'echo; pokemon-colorscripts -b -n {1} --no-title; cat /home/ez/Git/fuzzy-pokedex/pokeData/{1};' \
|
--bind=ctrl-b:preview:'echo; pokemon-colorscripts -b -n {1} --no-title; cat /home/ez/Git/fuzzy-pokedex/pokeData/{1};' \
|
||||||
--bind=ctrl-s:preview:'echo; pokemon-colorscripts -s -n {1} --no-title; cat /home/ez/Git/fuzzy-pokedex/pokeData/{1};' \
|
--bind=ctrl-s:preview:'echo; pokemon-colorscripts -s -n {1} --no-title; cat /home/ez/Git/fuzzy-pokedex/pokeData/{1};' \
|
||||||
--bind=ctrl-n:preview:'echo; pokemon-colorscripts -n {1} --no-title; cat /home/ez/Git/fuzzy-pokedex/pokeData/{1};'|
|
--bind=ctrl-n:preview:'echo; pokemon-colorscripts -n {1} --no-title; cat /home/ez/Git/fuzzy-pokedex/pokeData/{1};' |
|
||||||
awk '{ printf "%s", $1}' |
|
|
||||||
parallel pokemon-colorscripts --no-title -n {} "&&" cat /home/ez/Git/fuzzy-pokedex/pokeData/{}
|
parallel pokemon-colorscripts --no-title -n {} "&&" cat /home/ez/Git/fuzzy-pokedex/pokeData/{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
### Update Pokemon stats file set
|
||||||
update_pokeData() {
|
update_pokeData() {
|
||||||
echo -e "\n\t\tWARNING!!!\n\tThis WILL take a long time\n"
|
echo -e "\n\t\tWARNING!!!\n\tThis WILL take a long time\n"
|
||||||
pokemon-colorscripts -l | sort | parallel --bar --color -j 200% /home/ez/Git/fuzzy-pokedex/pokeinfo {} ">" /home/ez/Git/pokedex/pokeData/{}
|
pokemon-colorscripts -l | sort | parallel --bar --color -j 200% /home/ez/Git/fuzzy-pokedex/pokeinfo {} ">" /home/ez/Git/pokedex/pokeData/{}
|
||||||
|
@ -35,7 +48,7 @@ if [[ ! "$1" =~ ^- ]]; then
|
||||||
else
|
else
|
||||||
for opt in "$@"; do
|
for opt in "$@"; do
|
||||||
case $opt in
|
case $opt in
|
||||||
-u|--aur)
|
-u|--update)
|
||||||
update_pokeData
|
update_pokeData
|
||||||
;;
|
;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
|
|
Loading…
Reference in New Issue