diff options
author | mail_redacted_for_web | 2014-08-09 20:56:47 +0200 |
---|---|---|
committer | mail_redacted_for_web | 2014-08-09 20:56:47 +0200 |
commit | a3c96046e7dda5d18c0bfdf07df9952b7ecf9670 (patch) | |
tree | 694d1c3a3d1841598e8124a49a92a361b319ecea | |
parent | 6625daba2df44ed75e424d1b87a750d3b895b2dc (diff) | |
download | mp3dir2html-a3c96046e7dda5d18c0bfdf07df9952b7ecf9670.tar.bz2 |
move of the header file, regex now in head of script
-rwxr-xr-x | bin/mp3dirlist | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/mp3dirlist b/bin/mp3dirlist index 7c98b2c..4bba771 100755 --- a/bin/mp3dirlist +++ b/bin/mp3dirlist @@ -1,10 +1,10 @@ #!/bin/bash -if [ -e "temp.csv" ]; then - exit 127 -elif [ -e "content.csv" ]; then - exit 127 -fi +# Paste a file here that contains the HTML code to be placed _before_ the MP3 tag list. +DIRLISTHEAD="/etc/mp3dir2html/head.php" + +# Regular expression that is to be excluded in the final listing +DIRLISTEX='^Susperia|^B.*hse.*nkelz' if [ "$1" == "" ]; then SDIR="*" @@ -39,12 +39,13 @@ exiftool -ext .mp3 -ext .MP3 -ext .wma -ext .WMA -ext .ogg -ext .OGG -lang en -A ## sort -t \t -k 1,1 -k 2,2n -k 3,3 -k 4,4 |\ ## sort -t \t -k 1,1 |\ sort -t \t -k 1,2 -k 2,3 -k 4,5 -k 3,4 |\ - grep -vE '^Susperia|^B.*hse.*nkelz' |\ + grep -vE "$DIRLISTEX"|\ awk -F '\t' '{print $1"\t"$2"\t"$3}' |\ sed 's/" "/ /g;s/"0"/0/g' > content.csv -cat /windows/D/MP3s/raw.php > content.php +cat "$DIRLISTHEAD" > content.php sed 's/^/<tr><td>/g;s/\t/<\/td><td>/g;s/$/<\/td><\/tr>/g' content.csv >> content.php +rm content.csv echo -e '\n\n</table>\n</div>\n</div>\n</body>\n</html>' >> content.php # sed 's/========.*/========/g' |\ |