Skip to content

Instantly share code, notes, and snippets.

@reasonset
Created February 13, 2016 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reasonset/e47fb9ce9c70abbbbfac to your computer and use it in GitHub Desktop.
Save reasonset/e47fb9ce9c70abbbbfac to your computer and use it in GitHub Desktop.
Convert SMplayer(Linux)'s playlist to COWON M2 media player's playlist.
#!/usr/bin/zsh
playlist_file="$1"
shift
perl -p -e 's:/:\\:g;' -e 'print "\\" if m/^[^\s#]/;' "$playlist_file" >| ${playlist_file:s/-utf8.m3u/.m3u}
mv -v "$playlist_file" ~/local/cowon-m2/playlists/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment