CDDB_get(3)

πŸ’Ώ CDDB_get(3) β€” the manual, but make it a group chat πŸ’Ώ

okay so bestie, this is the CDDB_get manual page from the Perl world β€” User Contributed Perl Documentation, no cap ✨. If you've ever wanted your script to peek at an audio CD, find out what it actually is, and pull the artist/track info from the CDDB, this is literally the module for you. Let's get into it πŸŽ€


✨ NAME ✨

CDDB β€” Read the CDDB entry for an audio CD in your drive. yes bestie, it does exactly what it says on the tin πŸ’…


🌸 SYNOPSIS 🌸

okay so here's the whole vibe, copied exactly so you can steal it:

use CDDB_get qw( get_cddb );

my %config;

# following variables just need to be declared if different from defaults

$config{CDDB_HOST}="freedb.freedb.org";        # set cddb host
$config{CDDB_PORT}=8880;                       # set cddb port
$config{CDDB_MODE}="cddb";                     # set cddb mode: cddb or http
$config{CD_DEVICE}="/dev/cdrom";               # set cd device

# user interaction welcome?

$config{input}=1;   # 1: ask user if more than one possibility
                    # 0: no user interaction

# get it on

my %cd=get_cddb(\%config);

unless(defined $cd{title}) {
  die "no cddb entry found";
}

# do somthing with the results

print "artist: $cd{artist}\n";
print "title: $cd{title}\n";
print "category: $cd{cat}\n";
print "cddbid: $cd{id}\n";
print "trackno: $cd{tno}\n";

my $n=1;
foreach my $i ( @{$cd{track}} ) {
  print "track $n: $i\n";
  $n++;
}

(and yes, somthing is spelled that way in the original β€” we don't fix, we preserve πŸ‘‘)


πŸ¦‹ DESCRIPTION πŸ¦‹

This module/script gets the CDDB info for an audio cd. You need LINUX, SUNOS or *BSD, a cdrom drive and an active internet connection in order to do that. that's the whole assignment bestie β€” no drive, no internet, no cute CD metadata for you 😭


🧚 INSTALLATION 🧚

Run perl Makefile.pl as usual. (make, make install next) β€” that's it, that's the ritual πŸ”₯


πŸ’œ LICENSE & DISCLAIMER πŸ’œ

This library is released under the same conditions as Perl, that is, either of the following:

  • a) the GNU General Public License Version 2 as published by the Free Software Foundation,
  • b) the Artistic License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details. (translation: it's free, it's hopeful, it promises nothing β€” read the fine print bestie πŸ’€)

You should have received a copy of the Artistic License with this Kit, in the file named Artistic. If not, I'll be glad to provide one.

You should also have received a copy of the GNU General Public License along with this program, in the file names Copying; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

If you use this library in a commercial enterprise, you are invited, but not required, to pay what you feel is a reasonable fee to the author, who can be contacted at armin@xos.net β€” invited, not required, so no pressure, but the author is right there if you're feeling generous 🫢


(c) 2003 Armin Obersteiner <armin(at)xos(dot)net> β€” iconic, legendary, we stan πŸ’–


🌈 SEE ALSO 🌈

perl(1), Linux: /usr/include/linux/cdrom.h, Solaris, *BSD: /usr/include/sys/cdio.h.

iykyk β€” go read those if you want the deep lore πŸ¦‹


and that's the whole page bestie! fr fr, this one's brought to you by perl v5.42.0, dated 2024-03-04, and the CDDB_get(3) manual page itself πŸ’…βœ¨ slay responsibly πŸŽ€

πŸ“¦ where this page comes from