#!/usr/bin/perl -w
-# Ian Beckwith <ianb@erislabs.net>
#
+# id3fs - a FUSE-based filesystem for browsing audio metadata
+# Copyright (C) 2010 Ian Beckwith <ianb@erislabs.net>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
use lib '/home/ianb/projects/id3fs/id3fs/lib';
use strict;
my $verbose=0;
my $help=0;
my $dbpath=undef;
+my $tagdepth=undef;
Configure(qw(bundling no_ignore_case));
my $optret=GetOptions(
- "verbose|v" => \$verbose,
- "quiet|q" => sub { $verbose=0; },
+ "verbose|v" => sub { $verbose++; },
"help|h" => \$help,
"database|f=s" => \$dbpath,
+ "t|tagdepth=s" => \$tagdepth,
);
usage() if(scalar(@ARGV) != 2 || !$optret || $help);
my $source=shift;
my $mountpoint=shift;
-my $db=ID3FS::DB->new($me, $verbose, 0, $dbpath, $source);
+my $db=ID3FS::DB->new($me, $verbose, 0, $source, $dbpath);
exit unless($db);
-my $fuse=ID3FS::Fuse->new($db, $source, $mountpoint, $verbose);
+my $fuse=ID3FS::Fuse->new($db, $source, $mountpoint, $verbose, $tagdepth);
$fuse->run();
sub usage
{
die("Usage: $me [-vqh] [-f <dbfile>] [--] <sourcedir> <mountpoint>\n".
- " -v\t\t\tVerbose\n".
- " -q\t\t\tQuiet (default)\n".
+ " -v\t\t\tVerbose (repeat for more verbosity)\n".
" -h\t\t\tThis help\n".
" -f|--database=FILE\tPath to database file\n" .
" --\t\t\tEnd of options\n");
=head1 SYNOPSIS
-B<id3fsd> [B<-vqh>] S<B<[-f >I<dbfile>]> [B<-->] I<SOURCEDIR> I<MOUNTPOINT>
+B<id3fsd> [B<-vh>] S<B<[-f >I<dbfile>]> [B<-->] I<SOURCEDIR> I<MOUNTPOINT>
=head1 DESCRIPTION
=item B<-v>
-Enable verbose operation.
-
-=item B<-q>
-
-Quiet (no output). This is the default.
+Enable verbose operation. Repeat for more verbosity.
=item B<-h>