diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rwxr-xr-x | build_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 @@ -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; |