Browse Source

remove junk

rewrite
DanielFGray 6 years ago
parent
commit
23703b798d
  1. 35
      tekup

35
tekup

@ -5,7 +5,6 @@ declare processes=1 @@ -5,7 +5,6 @@ declare processes=1
declare expire
declare delete_key
declare log_file
declare -r config_file="${XDG_CONFIG_DIR:-$HOME/.config}/fzmp/conf"
declare -r c_red=$(tput setaf 1)
declare -r c_blue=$(tput setaf 4)
declare -r c_reset=$(tput sgr0)
@ -59,38 +58,6 @@ has() { @@ -59,38 +58,6 @@ has() {
done
}
parse_config_file() {
local line key val nr=0
while IFS= read -r line; do
(( ++nr ))
[[ -z "$line" || "$line" = '#'* ]] && continue
read -r key <<< "${line%% *}"
read -r val <<< "${line#* }"
if [[ -z "$val" ]]; then
config_err+=( "missing value for \"$key\" in config file on line $nr" )
continue
fi
case "$key" in
log_file) log_file="$val" ;;
generate_deletion_key) log_file="$val" ;;
# full_song_format) track_format="$val" ;;
# fzf_options) [[ ! -v FZMP_FZF_OPTIONS ]] && FZMP_FZF_OPTIONS="$val" ;;
# default_view)
# if [[ "$val" =~ playlist|songs|artists ]]; then
# case "$val" in
# playlist) default_filter='filter_by_playlist' ;;
# songs) default_filter='filter_all_songs' ;;
# artists) default_filter='filter_by_artist' ;;
# esac
# else
# config_err+=( "unknown vi \"$val\" in config file on line $nr" )
# fi
# ;;
*) config_err+=( "unknown key \"$key\" in config file on line $nr" )
esac
done
}
upload_text() {
local file curl_opts
file="$1"
@ -186,8 +153,6 @@ parse_response() { @@ -186,8 +153,6 @@ parse_response() {
has -v curl jq || die
[[ -s "$config_file" ]] && parse_config_file < "$config_file"
OPTERR=0
while getopts 'hve:d' opt; do
case "$opt" in

Loading…
Cancel
Save