source: mp3-find/trunk/bin/tagger @ 34

Last change on this file since 34 was 1, checked in by peter, 19 years ago

Initial import

File size: 713 bytes
Line 
1#!/usr/bin/perl -w
2use strict;
3
4use lib '/home/peter/projects/mp3-find/lib';
5use MP3::Find qw(Filesystem);
6use MP3::Find::Util qw(build_query);
7use File::Spec::Functions qw(catfile);
8
9use Term::ReadKey;
10
11my ($DIRS, $QUERY) = build_query(@ARGV);
12push @$DIRS, '.' unless @$DIRS;
13
14for my $mp3 (find_mp3s(
15    dir         => $DIRS,
16    query       => $QUERY,
17    ignore_case => 1, #$IGNORE_CASE,
18    exact_match => 0, #$EXACT_MATCH,
19    no_format => 1,
20    db_file     => catfile($ENV{HOME}, 'mp3.db'),
21)) {
22    print "$$mp3{FILENAME}\n";
23    my $i;
24    for (qw(ARTIST TITLE ALBUM YEAR GENRE)) {
25        printf "[%d] %-6s  %s\n", ++$i, $_, $$mp3{$_};
26    }
27    print "Change [1-5]? ";
28    my $key = ReadKey(0);
29}   
30
Note: See TracBrowser for help on using the repository browser.