summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2010-10-09 05:28:55 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2010-10-09 05:28:55 -0700
commitc1d879e02f472c1bc5c6cdcc8fa51643872760c4 (patch)
tree2a53d2b91de457e2df90385f81176cc3afb3b400
parent62564fd2d5a0e8807dd28cbb7c42fef579e52aa6 (diff)
downloadomptagger-c1d879e02f472c1bc5c6cdcc8fa51643872760c4.tar.gz
omptagger-c1d879e02f472c1bc5c6cdcc8fa51643872760c4.tar.xz
Add information.
-rwxr-xr-xomptagger47
1 files changed, 38 insertions, 9 deletions
diff --git a/omptagger b/omptagger
index f07c05b..f7ed1ed 100755
--- a/omptagger
+++ b/omptagger
@@ -20,6 +20,14 @@ require 'rubygems'
require 'TagLib'
require 'filemagic'
+class Hash
+ def longest_key_length
+ self.keys.inject(0) do |longest, key|
+ key.length > longest ? key.length : longest
+ end
+ end
+end
+
class String
def colourise(colour)
case colour
@@ -60,14 +68,6 @@ class String
end
end
-class Hash
- def longest_key_length
- self.keys.inject(0) do |longest, key|
- key.length > longest ? key.length : longest
- end
- end
-end
-
class Metadata
def output(tag, val, padding = 0)
puts tag.format(:tag) + ' ' * (2 + padding) + val
@@ -164,9 +164,38 @@ Options:
exit
end
+def info
+ puts <<-end
+Actions:
+ * Multiple actions can be chained together.
+ * Actions are executed in the order they are specified.
+ * Example: omptagger --view --set-tag ALBUM="Foobar" --view
+
+Schemes:
+ * The default file naming scheme is Track - Artist - Title.
+ * Schemes must be specified prior to actions that use them.
+ * Example: omptagger --scheme '%a - %t' --generate
+ * %a - Artist %* - Wildcard
+ %b - Album %% - Per cent sign
+ %d - Date
+ %n - Track
+ %t - Title
+
+Supported Tags:
+ * Vorbis comments: Any field name allowed by specification.
+ * ID3v2 frames: Artist, album, title, track, year.
+
+Tag Generation:
+ * Underscores in filenames are converted to spaces in tags.
+ * Backslashes in filenames are converted to forward slashes in tags.
+ end
+
+ exit
+end
+
actions = Array.new
options = Array.new
-scheme = '%a - %t'
+scheme = '%n - %a - %t'
GetoptLong.new(
['--view', '-v', GetoptLong::NO_ARGUMENT],