Sha256: afa0d974f212e4f420df5fdda970455f95d7134834466d3c9dfceae04a575bac

Contents?: true

Size: 1.58 KB

Versions: 2

Compression:

Stored size: 1.58 KB

Contents

module Tagomatic

  module Tags

    # Use these like this on the command line:
    # --format "%g/%a/%b (%y)/%n - %t.mp3"
    #
    # Or use them like this in folder-specific .format= file names:
    # touch ".format=%g|%a|%b (%y)|%n - %t.mp3"
    #
    # Some more examples showing what you can do:
    #
    # * Using %i (ignore) to swallow trash after album name:
    #   --format "%g/%a/%b - %i - %y/%n - %t.mp3"
    #
    # * Specifying text to be skipped:
    #   --format "%g/%a/%b - encoded by noone - %y/%n - %t.mp3"

    FORMAT_ID_ARTIST = 'a'
    FORMAT_ID_ARTIST_AGAIN = 'A'
    FORMAT_ID_ALBUM = 'b'
    FORMAT_ID_ALBUM_AGAIN = 'B'
    FORMAT_ID_DISC = 'd'
    FORMAT_ID_GENRE = 'g'
    FORMAT_ID_IGNORE = 'i'
    FORMAT_ID_TRACKNUM = 'n'
    FORMAT_ID_TITLE = 't'
    FORMAT_ID_WHITESPACE = 's'
    FORMAT_ID_EXTENDED_WHITESPACE = 'S'
    FORMAT_ID_YEAR = 'y'
    FORMAT_ID_SURROUNDED_YEAR = 'Y'

    FORMAT_REGEXP_ARTIST = '([^\/]+)'
    FORMAT_REGEXP_ARTIST_AGAIN = '([^-\/]+)' # do not allow dashes - 'AGAIN' is used mostly in file name part
    FORMAT_REGEXP_ALBUM = '([^\/]+)'
    FORMAT_REGEXP_ALBUM_AGAIN = '([^-\/]+)' # do not allow dashes - 'AGAIN' is used mostly in file name part
    FORMAT_REGEXP_DISC = '\s*([0-9]+)\s*'
    FORMAT_REGEXP_GENRE = '([^\/]+)'
    FORMAT_REGEXP_IGNORE = '([^\/]+)'
    FORMAT_REGEXP_TRACKNUM = '\s*\[?([0-9]+)\]?\s*'
    FORMAT_REGEXP_TITLE = '([^\/]+)'
    FORMAT_REGEXP_WHITESPACE = '\s*'
    FORMAT_REGEXP_EXTENDED_WHITESPACE = '[\s\-_\.]*'
    FORMAT_REGEXP_YEAR = '\s*([0-9]{4})\s*'
    FORMAT_REGEXP_SURROUNDED_YEAR = '\s*[\(\[]([0-9]+)[\)\]]\s*'

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tagomatic-0.1.9 lib/tagomatic/tags.rb
tagomatic-0.1.8 lib/tagomatic/tags.rb