5 %mandatory: Artist Album
6 %allowed: Year Collection Lossless
14 for col (cols/*) COLS=($COLS $col:t)
18 for (( i=2 ; i <= $#ts ; i++ )) {
19 [[ ${ts[$i]} =~ "^[0-9][0-9][0-9][0-9]$" ]] && {
25 artist=(${ts[1,$i-1]})
26 album=(${ts[$i+1,-1]})
33 wvs=($name/**/*.wv(N))
34 [[ ${#wvs} -gt 0 ]] && lossless=1
36 [[ $name:e = wv ]] && lossless=1
39 for col ($COLS) [[ -e cols/$col/$name ]] && cols=($cols $col)
41 print "Artist: ${(j/-/)artist:gs/_/ /}"
42 [[ -n $year ]] && print "Year: $year"
43 print "Album: ${(j/-/)album:gs/_/ /}"
44 [[ -n $lossless ]] && print "Lossless: yes"
45 for col ($cols) print "Collection: $col"