-->

Friday, November 29, 2013

Convert iTunes playlists in clementine / linux .m3u


1. Export one by one all your iTunes playlists in a folder called iTunes_playlists/

2. Examine one of them. In my case I have the music stored in the Z:\\ folder

#EXTM3U
#EXTINF:329,Thank You / Rebel And A Cause - Just A Band
Z:\music\iTunes\iTunes Media\Music\Just A Band\Sorry For The Delay\03 Thank You _ Rebel And A Cause.mp3
#EXTINF:216,Till We Try - Just A Band
Z:\music\iTunes\iTunes Media\Music\Just A Band\Sorry For The Delay\05 Till We Try.mp3


3. In my case I have to get rid of all the Z:\ and of all the backslashes \ to be linux compatible. 


#!/bin/bash
mkdir -p  music/playlists/; for i in  iTunes_playlists/*.m3u; do sed -e 's@Z:\\@/home/<your_username>/@' -e 's@\\@/@g' ${i} > music/playlists/${i}; done

No comments:

Post a Comment