summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlshprung <lshprung@yahoo.com>2021-09-09 16:55:41 -0700
committerlshprung <lshprung@yahoo.com>2021-09-09 16:55:41 -0700
commit39be83cf14e6affa6c4c2f978761182afb04b1b9 (patch)
tree39bb474f167bb6079b6ff799a5ef12ddbeff29bd
parenta5d3151a11f8b6c5257bc4f644220acde0cd1b2a (diff)
Added --table-name flag, changed name of file
-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;