Created
September 7, 2012 03:14
-
-
Save cdp1337/3662775 to your computer and use it in GitHub Desktop.
Just a quick script to generate a playlist of music in the current directory.
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
#!/bin/bash | |
# | |
# Version 0.1 | |
# Author Charlie Powell | |
# | |
# Name the playlist whatever this directory is called. | |
PLAYLIST="$(echo $(basename \\"`pwd`\\") | sed 's#\\##')" | |
# Create the file header, m3u was picked because it's dead simple. | |
echo '#EXTM3U' > "$PLAYLIST.m3u" | |
# And list the songs into the playlist file. | |
# @todo Change this to other formats if I feel like it. | |
ls -1 *.flac >> "$PLAYLIST.m3u" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment