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