summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2010-10-06 00:53:23 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2010-10-06 00:53:23 -0700
commit7685de9855d1abd113c846caf163937dabc1951c (patch)
tree6585ba6e365786d13168f96a482e98c02bb0fca9
parent00f837055cfbac8c6f7262f262f4fd9093f5299b (diff)
downloadomptagger-7685de9855d1abd113c846caf163937dabc1951c.tar.gz
omptagger-7685de9855d1abd113c846caf163937dabc1951c.tar.xz
Add help/list options.
-rwxr-xr-xomptagger59
1 files changed, 59 insertions, 0 deletions
diff --git a/omptagger b/omptagger
index 2cd07d7..d603ee8 100755
--- a/omptagger
+++ b/omptagger
@@ -10,6 +10,59 @@
require 'getoptlong'
+def help
+ puts <<-end
+Usage: omptagger [options] [files]
+
+Options:
+ --view -v View all tags
+ --view-tag -t View a tag
+ --set-tag -s Set a tag
+ --remove -r Remove all tags
+ --remove-tag -d Remove a tag
+ --generate -g Generate tags based on filename
+ --rename -m Generate filename based on tags
+ --scheme -n Specify a file naming scheme
+ --pretend -p Do not make any actual changes
+ --list -l Display list of available tags
+ --help -h Display help information
+
+Notes:
+ * The default file naming scheme is Artist - Title.
+ * Schemes must be specified prior to actions that use them.
+ end
+
+ exit
+end
+
+def list
+ puts <<-end
+┌────────────────────────┐
+│ Keys Vorbis Comments │
+├────────────────────────┤
+│ %a Artist │
+│ %b Album │
+│ %d Date │
+│ %n TrackNumber │
+│ %t Title │
+│ %* Wildcard │
+├────────────────────────┤
+│ Contact │
+│ Copyright │
+│ Description │
+│ Genre │
+│ ISRC │
+│ License │
+│ Location │
+│ Organization │
+│ Performer │
+│ Version │
+└────────────────────────┘
+ end
+
+ exit
+end
+
actions = Array.new
options = Array.new
scheme = '%a - %t'
@@ -42,3 +95,9 @@ GetoptLong.new(
actions << option
end
end
+
+help if options.include?(:help)
+list if options.include?(:list)
+help if actions.empty?
+
+puts 'No files specified.' if ARGV.empty?