Version 2 of generating a playlist using itunesdb

Updated 2006-02-06 01:18:16

AMG created a wonderful utility called itunesdb which allows you to retrieve information from an ipod in regards to the music stored on it.

Below is just one example of how to utilize the itunesdb package:


#!/usr/bin/tclsh package require itunesdb set ::basepath "h:" itunesdb db $::basepath/iPod_Control/iTunes/iTunesDB db seek track set ::fp open playlist.m3u w+ while {db remaining} {

 array set track [db read]
 puts $::fp "$::basepath[string map {: /} $track(ipod_path)]"

} close $::fp db destroy puts done


Simply change ::basepath to where your ipod is mounted, and run the script. The script will generate a file called playlist.m3u in the same directory it is stored in, hopefully allowing you to play the music from your ipod over your pc. More features, possibly, to come.