Created
October 23, 2017 04:59
-
-
Save duangsuse/fb6be9fc59cfdc8099e356899237a98f to your computer and use it in GitHub Desktop.
SuperTux Music Player
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for m in `ls|grep .music`;do | |
file_name=`grep -e '".*ogg' -h -o $m|cut -d '"' -f2` | |
loop_start=`grep -e "loop-begin *" -h $m|awk -F"[ ]" '{print $4}'|cut -d ')' -f 1` | |
loop_end=`grep -e "loop-at *" -h $m|cut -c 12-|cut -d ")" -f1` | |
printf "\033[32mPlaying SuperTux music \033[36m$file_name\033[0m:\033[0m";echo | |
printf "\033[34m[*] \033[0m";printf "\033[31mLoop starts at \033[33m$loop_start\\033[0m, ends at \033[35m$loop_end\033[0m \033[0m";echo | |
mpv $file_name --ab-loop-a $loop_start --ab-loop-b $loop_end;sleep 0.1 | |
done;unset file_name loop_start loop_end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment