diff options
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | bin/mp3dir2html | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -22,7 +22,7 @@ sedawk-exists: @command -v awk > /dev/null uninstall: - @rm -v /usr/local/share/man/man1/mp3dir2html.1.gz /usr/local/bin/mp3dir2html + @rm -vf /usr/local/share/man/man1/mp3dir2html.1.gz /usr/local/bin/mp3dir2html .PHONY: help diff --git a/bin/mp3dir2html b/bin/mp3dir2html index fcb5494..ce90f0b 100755 --- a/bin/mp3dir2html +++ b/bin/mp3dir2html @@ -44,7 +44,7 @@ function m3l_prep_table { sed 's/========.*/====/g' | sed 's/\t$/\t" "/g' | tr '\n' '\t' |\ sed 's/====/\n====/g;s/====\t/====/g' |\ sed 's/Artist\t//;s/Title\t//;s/Album\t//;s/\(.*\)Year\t/\1/;s/\(.*\)Track\t/\1/' |\ - uniq | sed 's/====//g;s/\ &\ /\ \&\;\ /g' | tr -s '\n' |\ + uniq | sed 's/====//g;s/&/\&\;/g' | tr -s '\n' |\ sed 's/\t0\t/\t"0"\t/g' } @@ -67,4 +67,8 @@ sed 's/^/<tr><td>/g;s/\t/<\/td><td>/g;s/$/<\/td><\/tr>/g' content.csv >> content rm content.csv echo -e '\n\n</table>\n</div>\n</div>\n</body>\n</html>' >> content.php +for i in `seq 0 9` `echo {A..Z}` `echo {a..z}`;do + sed -i -e "0,/^<tr><td>\($i\)/ s/^<tr><td>\($i\)/<tr><td id=\"_\\1\">\\1/" content.php +done + echo |