Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Tag::File(3)	      User Contributed Perl Documentation	  Tag::File(3)

NAME
       MP3::Tag::File -	Module for reading / writing files

SYNOPSIS
	 my $mp3 = MP3::Tag->new($filename);

	 ($song, $artist, $no, $album) = $mp3->read_filename();

       see MP3::Tag

DESCRIPTION
       MP3::Tag::File is designed to be	called from the	MP3::Tag module.

       It offers possibilities to read/write data from files.

	   read_filename()

	     ($song, $artist, $no, $album) = $mp3->read_filename($what,	$filename);

	   read_filename() tries to extract information	about artist, song,
	   song	number and album from the filename.

	   This	is likely to fail for a	lot of filenames, especially the album
	   will	be often wrongly guessed, as the name of the parent directory
	   is taken as album name.

	   $what and $filename are optional. $what maybe song, track, artist
	   or album.  If $what is defined read_filename	will return only this
	   element.

	   If $filename	is defined this	filename will be used and not the real
	   filename which was set by MP3::Tag with "MP3::Tag-"new($filename)>.

	   Following formats will be hopefully recognized:

	   - album name/artist name - song name.mp3

	   - album_name/artist_name-song_name.mp3

	   - album.name/artist.name_song.name.mp3

	   - album name/(artist	name) song name.mp3

	   - album name/01. artist name	- song name.mp3

	   - album name/artist name - 01 - song.name.mp3

	   song()

	    $song = $mp3->song($filename);

	   Returns the song name, guessed from the filename. See also
	   read_filename()

	   $filename is	optional and will be used instead of the real filename
	   if defined.

	   artist()

	    $artist = $mp3->artist($filename);

	   Returns the artist name, guessed from the filename. See also
	   read_filename()

	   $filename is	optional and will be used instead of the real filename
	   if defined.

	   track()

	    $track = $mp3->track($filename);

	   Returns the track number, guessed from the filename.	See also
	   read_filename()

	   $filename is	optional and will be used instead of the real filename
	   if defined.

	   album()

	    $album = $mp3->artist($album);

	   Returns the album name, guessed from	the filename. See also
	   read_filename() The album name is guessed from the parent
	   directory, so it is very likely to fail.

	   $filename is	optional and will be used instead of the real filename
	   if defined.

POD ERRORS
       Hey! The	above document had some	coding errors, which are explained
       below:

       Around line 29:
	   You can't have =items (as at	line 131) unless the first thing after
	   the =over is	an =item

	   =over without closing =back

perl v5.32.0			  2001-08-06			  Tag::File(3)

NAME | SYNOPSIS | DESCRIPTION | POD ERRORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=MP3::Tag::File&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help