Net::FreeDB2

Net::FreeDB2 is a Perl module with FreeDB generic connection class.
Download

Net::FreeDB2 Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Vincenzo Zocca
  • Publisher web site:
  • http://search.cpan.org/~zoccav/HH-Unispool-Config-0.3/lib/HH/Unispool/Config/File/Token/Unnumbered/Bcs.pm

Net::FreeDB2 Tags


Net::FreeDB2 Description

Net::FreeDB2 is a Perl module with FreeDB generic connection class. Net::FreeDB2 is a Perl module with FreeDB generic connection class.SYNOPSIS # quick and dirty CD ripper use strict; # Make device name use Getopt::Std; $::opt_d = ''; getopts ('d:'); my $dev = $::opt_d || '/dev/cdrom'; # Make a Net::FreeDB2::connection use Net::FreeDB2; my $conn = Net::FreeDB2->connection ({ client_name => 'quickrip', client_version => '1.0', }); # Create a Net::FreeDB2::Entry object with the information in it from the CD # in $dev use Net::FreeDB2::Entry; my $entry = Net::FreeDB2::Entry->new ({dev => $dev}); # Query the FreeDB/CDDB database my $res = $conn->query ($entry); $res->hasError () && die ('Oops, error quering FreeDB'); # Check for matches if (! scalar ($res->getMatches ())) { warn ('No matches found'); exit (0); } # Get the first match my $match = ($res->getMatches ()); # Read the match into an entry my $res = $conn->read ($match); $res->hasError () && die ('Oops, error reading FreeDB'); my $entry = $res->getEntry (); # Make cdparanoia commands to rip the tracks my $tracks = scalar ($entry->getFrameOffset ()); my @cmd = qw (cdparanoia); push (@cmd, '-d', $dev); push (@cmd, '-B'); for (my $i = 1; $i getTtitlen ($i); $title =~ s/s+/-/g; my @cmd = (@cmd, $i); # Execute command print STDERR "@cmdn"; system (@cmd); die ('Oops, command failed') if ($?>>8); # Rename output file my $src = sprintf ("trackd.cdda.wav", $i); my $dest = sprintf ("d-%s.wav", $i, $title); print STDERR "mv $src $destn"; rename ($src, $dest); }Net::FreeDB2 is another FreeDB/CDDB access class hierarchy. The basics are similar to the other FreeDB/CDDB Perl modules.However, in the writers opinion, the details differ enough for it to have a certain right of existance. It's organization is inspired by Net::LDAP.Requirements:· Perl Requirements: · Perl


Net::FreeDB2 Related Software