Mac::iPod::DB - OO extension for reading iPod database
use Mac::iPod::DB; my $db = new Mac::iPod::DB('/Volumes/IPOD/iPod_Control/iTunes/iTunesDB'); foreach my $pl ($db->playlists) { printf "playlist: %s\n", $pl->name; foreach my $sid ($pl->songs) { ( my $path = $db->song($sid)->path() ) =~ s/\:/\//g; printf "Artist: %s title: %s path: %s\n", $db->song($sid)->artist(), $db->song($sid)->title(), $path; } }
new(<PATH_TO_DB_FILE>) instantiate a new object passing the path location of the iPod DB file $obj->playlists() returns an array of playlist objects $obj->songIds() returns an array of song ids (integers) $obj->songs() returns an array of song objects $obj->song(<song id>) returns a song object
$obj->id $obj->title $obj->path $obj->album $obj->artist $obj->genre $obj->fdesc $obj->comment $obj->composer $obj->bitrate $obj->time $obj->filesize $obj->songnum $obj->songs $obj->cdnum $obj->cds $obj->year
$obj->songs returns an array of song ids (integers) that are associated with the playlist
None by default.
Sean Scanlon, <sps at bluedot.net>
Copyright 2003 by Sean Scanlon. Large portions of this module are Copyright (C) 2002-2003 Adrian Ulrich <pab at blinkenlights.ch>
This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
To install Mac::iPod::DB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mac::iPod::DB
CPAN shell
perl -MCPAN -e shell install Mac::iPod::DB
For more information on module installation, please visit the detailed CPAN module installation guide.