summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rwxr-xr-xbuild_db.plx (renamed from main.plx)12
2 files changed, 13 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f89bba4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!.gitignore
+
+!build_db.plx
diff --git a/main.plx b/build_db.plx
index b971d8a..40e5363 100755
--- a/main.plx
+++ b/build_db.plx
@@ -101,9 +101,10 @@ sub print_help {
Generate a database for audio files in DIRECTORY (by default ~/Music).
Options:
- -a, --append Append to database file, instead of overwriting it
- -h, --help display this help and exit
- -o, --output FILE specify output file for database (default is library.db at the root of DIRECTORY)
+ -a, --append append to database file, instead of overwriting it
+ -h, --help display this help and exit
+ -o, --output FILE specify output file for database (default is library.db at the root of DIRECTORY)
+ -t, --table-name TABLE specify table name in database file (default is LIBRARY)
";
}
@@ -134,6 +135,11 @@ for (my $i = 0; $i <= $#ARGV; $i++){
$options{output} = 1;
}
+ elsif ($ARGV[$i] =~ /-t|--table-name/){
+ $i++;
+ $table_name = $ARGV[$i];
+ }
+
elsif ($ARGV[$i] =~ /^[^-]/){
$music_dir = "$ARGV[$i]";
last;