source: mp3-find/trunk/bin/mp3db @ 25

Last change on this file since 25 was 23, checked in by peter, 19 years ago
  • removed hardcoded "use lib '/home/peter/projects/mp3-find/lib'" form distrubuted scripts
File size: 1.3 KB
Line 
1#!/usr/bin/perl -w
2use strict;
3
4use MP3::Find::DB;
5
6use File::Spec::Functions qw(catfile);
7use Getopt::Long;
8GetOptions(
9    'create'   => \my $CREATE,
10    'file|f=s' => \my $DB_FILE,
11);
12
13$DB_FILE ||= catfile($ENV{HOME}, 'mp3.db');
14
15my @DIRS = @ARGV;
16
17my $f = MP3::Find::DB->new;
18$f->create_db($DB_FILE) if $CREATE;
19$f->update_db($DB_FILE, \@DIRS) if @DIRS;
20
21=head1 NAME
22
23mp3db - Frontend for creating and updating a database for MP3::Find::DB
24
25=head1 SYNOPSIS
26
27    # create the database file
28    $ mp3db --create --file my_mp3.db
29   
30    # add info
31    $ mp3db --file my_mp3.db ~/mp3
32   
33    # update, and add results from another directory
34    $ mp3db --file my_mp3.db ~/mp3 ~/cds
35
36=head1 DESCRIPTION
37
38    mp3db [options] [directory] [directories...]
39
40Creates and/or updates a database of ID3 data from the mp3s found
41in the given directories.
42
43=head2 Options
44
45=over
46
47=item C<--create>, C<-c>
48
49Create the database file named by the C<--file> option.
50
51=item C<--file>, C<-f>
52
53The name of the database file to work with. Defaults to F<~/mp3.db>.
54
55=back
56
57=head1 AUTHOR
58
59Peter Eichman <peichman@cpan.org>
60
61=head1 COPYRIGHT AND LICENSE
62
63Copyright (c) 2006 by Peter Eichman. All rights reserved.
64
65This program is free software; you can redistribute it and/or
66modify it under the same terms as Perl itself.
67
68=cut
Note: See TracBrowser for help on using the repository browser.