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