createindex
This commit is contained in:
parent
fb2ec4bd9c
commit
a51d00b2e9
@ -35,7 +35,6 @@ declare -r \
|
||||
oldIFS="$IFS"
|
||||
|
||||
cffile="$HOME/.atom/atom.cfg"
|
||||
LC_ALL=C
|
||||
|
||||
shopt -s extglob
|
||||
|
||||
@ -110,18 +109,17 @@ openDatabase
|
||||
|
||||
columns="${show[@]//*/-}"
|
||||
|
||||
if [[ "$output" == - ]]
|
||||
if ! [[ "$output" == - ]]
|
||||
then
|
||||
exec > >(column -x -c ${#show[@]})
|
||||
else
|
||||
exec > >(column -x -c ${#show[@]} > "$output")
|
||||
exec > "$output"
|
||||
fi
|
||||
|
||||
printline() {
|
||||
local print
|
||||
for index in ${!show[@]}
|
||||
do
|
||||
info="${show[index]}"
|
||||
locallength="${length[index]}"
|
||||
locallength="${length[index]:=50}"
|
||||
path="$olddir"
|
||||
case $info in
|
||||
'bitrates')
|
||||
@ -135,13 +133,14 @@ printline() {
|
||||
info="${!info}"
|
||||
;;
|
||||
esac
|
||||
if [ -n "$locallength" ]
|
||||
then
|
||||
echo "${info:0:$locallength}"
|
||||
else
|
||||
echo "$info"
|
||||
fi
|
||||
printtmp="${info:0:$locallength}"
|
||||
until (( ${#printtmp} == locallength ))
|
||||
do
|
||||
printtmp+=' '
|
||||
done
|
||||
print+=(${print+|} "$printtmp")
|
||||
done
|
||||
echo "${print[@]}"
|
||||
}
|
||||
|
||||
if (( update ))
|
||||
@ -158,7 +157,7 @@ printDate() {
|
||||
for index in ${!show[@]}
|
||||
do
|
||||
info="${show[index]}"
|
||||
locallength="${length[index]}"
|
||||
locallength="${length[index]:=50}"
|
||||
case $info in
|
||||
albumartists) info="Album artist" ;;
|
||||
albums) info="Album" ;;
|
||||
@ -176,18 +175,16 @@ do
|
||||
titles) info="Title" ;;
|
||||
years) info="Date" ;;
|
||||
esac
|
||||
if [ -n "$locallength" ]
|
||||
then
|
||||
line+="${line+
|
||||
}${info:0:$locallength}"
|
||||
else
|
||||
line+="${line+
|
||||
}$info"
|
||||
fi
|
||||
printtmp="${info:0:$locallength}"
|
||||
until (( ${#printtmp} == locallength ))
|
||||
do
|
||||
printtmp+=' '
|
||||
done
|
||||
print+=(${print+|} "$printtmp")
|
||||
done
|
||||
echo "$line"
|
||||
#echo "${line//[^\n]/-}"
|
||||
unset line
|
||||
echo "${print[@]}"
|
||||
echo "${print[@]//[^|]/=}"
|
||||
unset print
|
||||
|
||||
echo '
|
||||
SELECT
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user