Mac::iPod::GNUpod is a Perl module to add and remove songs from your iPod; read and write databases in iTunes and GNUpod format.
This is the module to do anything with your iPod, with methods for initializing your iPod, adding and removing songs, and reading and writing databases in the iTunes and GNUpod formats. This module was originally based on the GNUpod script package, written and distributed by Adrian Ulrich, (pab at blinkenlights.ch), http://www.gnu.org/software/gnupod/. However, a lot of development has occurred since then, making the module more flexible and more appropriate for CPAN. This module and the GNUpod scripts remain completely interoperable--they write the same file format and work in much the same way.
my $ipod = Mac::iPod::GNUpod->new(mountpoint => '/mnt/ipod');
# Read existing databases
# Add songs
my $id = $ipod->add_song('~/music/The Foo Brothers - All Barred Up.mp3');
# Get paths to songs
my $path = $ipod->get_path($id);
# Find the id numbers of existing songs
my @yuck = $ipod->search(artist => 'Yoko Ono');
# Remove songs based on id
# Write databases
Mac::iPod::GNUpod is a module designed to let you read the database(s) on your iPod and add and remove songs from it using Perl. It is based on the GNUpod script package written by Adrian Ulrich, which is available at http://www.gnu.org/software/gnupod/. You do NOT need to install the GNUpod scripts in order to use Mac::iPod::GNUpod module. The GNUpod scripts use a plaintext XML database alongside the binary iTunes database used internally by the iPod. This package is capable of reading and writing both the GNUpod database format and the iTunes database format, and can peacefully coexist with both.