Audio-DB

 view release on metacpan or  search on metacpan

bin/create_database.PLS  view on Meta::CPAN

    }
  } else {
    print "All files succesfully read\n\n.";
  }
}

__END__

=pod

=head1 create_database

=head1 SYNPOSIS

This is a simple demonstration script that quickly build a relational
database of your music collection from flat files, XML dumps, or from
MP3 tags themselves.  It illustrates the primary functions of the
Audio::DB::Build module.

 create_database --user todd --pass password --dsn todds_music \
                 --library /Users/todd/Music/iTunes/iTunes\ Music\ Library.xml

=head1 OPTIONS

Options:
   adaptor  either dbi::sqlite or dbi::mysql
   dsn      the name of your database
   user     database username, if required
   pass     database password if required
   host     database host, if other than localhost

In addition, you should supply one of the following options:

   library  full path to your iTunes Music Library.xml file
   dirs     full path to directories containing MP3s to read
   files    full path to directories containing flat files of information
   cols     (if the files option is provided, pass an ordered list of column names)

To create a database using an itunes XML file and mysql:
  create_database -adaptor dbi::mysql -dsn new_library -library Music/Library.xml

To create a database by reading the ID3 tags directly (MP3s ONLY!):
   create_database -adaptor dbi::mysql -dsn new_library -dirs /Music/ /temp/

To create a database from a flatfile of information:
   create_database -adaptor dbi::mysql -dsn new_library -files Documents/music_info.txt \
                   -cols album artist track title total_tracks

Columns should correspond to those found in in the data hash.  See the
section describing the load_database method of Audio::DB::Build.

=head1 AUTHOR

 Todd Harris (harris@cshl.org);
 $Id: create_database.PLS,v 1.1 2005/02/27 16:56:25 todd Exp $

=cut

!NO!SUBS!
close OUT or die "Can't close $file: $!";
chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
chdir $origdir;



( run in 0.997 second using v1.01-cache-2.11-cpan-39bf76dae61 )