diff options
author | lshprung <lshprung@yahoo.com> | 2021-09-09 16:55:41 -0700 |
---|---|---|
committer | lshprung <lshprung@yahoo.com> | 2021-09-09 16:55:41 -0700 |
commit | 39be83cf14e6affa6c4c2f978761182afb04b1b9 (patch) | |
tree | 39bb474f167bb6079b6ff799a5ef12ddbeff29bd | |
parent | a5d3151a11f8b6c5257bc4f644220acde0cd1b2a (diff) |
Added --table-name flag, changed name of file
-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; |