Skip to content

Commit

Permalink
Completed changing curl to wget. version 0.3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
shinokada committed Jul 29, 2021
1 parent c62fd0e commit 0b48916
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
16 changes: 1 addition & 15 deletions lucky.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,7 @@ fn_lucky() {
# ask a tag word
printf "Genre/keyword: "
read -r REPLY
# find all stations with a key word
# select one station using

# SEARCH_RESULTS="${TMP_PATH}/radio_searches.json"
# OPTS=()
# for TAG in "${RES[@]}"; do
# OPTS+=(-d "tag=$TAG")
# done

# curl -X POST "${OPTS[@]}" "$SEARCH_URL" -o "$SEARCH_RESULTS" >&/dev/null
# greenprint "Searching ..."
# wget --post-data "$OPTS" "$SEARCH_URL" -O "$SEARCH_RESULTS" 2>/tmp/tera_error || {
# redprint "Something went wrong. Please see /tmp/tera_error"
# exit
# }
# find all stations with a key word = tag
_wget_simple_search "$REPLY" "tag"
# find the list length
LENGTH=$(jq length "$SEARCH_RESULTS")
Expand Down
1 change: 0 additions & 1 deletion search

This file was deleted.

4 changes: 2 additions & 2 deletions search.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ search_by() {

advanced_search() {
SEARCH_RESULTS="${TMP_PATH}/radio_searches.json"
# curl -X POST -d 'tag=jazz' -d 'state=queensland' http://all.api.radio-browser.info/json/stations/search

magentaprint "The query format is -d field=word."
magentaprint "Field can be one of tag, name, language, country code and state."
magentaprint "Fields can be combined, for example: -d tag=jazz -d state=queensland"
Expand All @@ -102,7 +102,7 @@ advanced_search() {
printf "Write your quiry: "
read -ra REPLY
_wget_search "${REPLY[@]}"
# curl -X POST "${RES[@]}" "$SEARCH_URL" -o "$SEARCH_RESULTS" >&/dev/null

LENGTH=$(jq length "$SEARCH_RESULTS")

# check $SEARCH_RESULT has length is more than 0
Expand Down
2 changes: 1 addition & 1 deletion tera
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eu

# shellcheck disable=SC2034
VERSION="0.3.12"
VERSION="0.3.13"
SCRIPT_DOT_DIR="$HOME/.config/tera"
# CACHE_DIR="$HOME/.cache"
FAVORITE_PATH="$SCRIPT_DOT_DIR/favorite"
Expand Down

0 comments on commit 0b48916

Please sign in to comment.