Skip to content

Instantly share code, notes, and snippets.

@cgoldberg
Last active May 27, 2019 12:39
Show Gist options
  • Save cgoldberg/1a6804ba1456ddcc37f627d08fb379a5 to your computer and use it in GitHub Desktop.
Save cgoldberg/1a6804ba1456ddcc37f627d08fb379a5 to your computer and use it in GitHub Desktop.
scan music library and create M3U playlists
## scan music library and create M3U playlists
# example shell commands:
# 500 random MP3's
find /path/to/music -type f -iname "*.mp3" | shuf | head -n 500 > 500_playlist.m3u
# All MP3's and FLAC's, sorted
find /path/to/music -type f \( -iname '*.mp3' -o -iname '*.flac' \) | sort > full_playlist.m3u
# Multiple artists, shuffled
find /mnt/blue/Tunes/FLAC -type f \
\( \
-iname "andrew mcmahon*.flac" \
-o \
-iname "something corporate*.flac" \
-o \
-iname "jack's mannequin*.flac" \
\) \
| shuf > playlist.m3u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment