From c1d879e02f472c1bc5c6cdcc8fa51643872760c4 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sat, 9 Oct 2010 05:28:55 -0700 Subject: Add information. --- omptagger | 47 ++++++++++++++++++++++++++++++++++++++--------- 1 file 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], -- cgit v1.2.3-70-g09d2