Top Level Namespace

Defined Under Namespace

Modules: FileRenamer Classes: Array, String

Constant Summary collapse

OPTIONS =

p [‘abc’, ‘abd’, ‘abe’].common_length #should be 2 p [‘abc’, ‘abd’, ‘ab’].common_length #should be 2 p [‘abcd’, ‘abce’, ‘abcde’].common_length #should be 2 p [‘biblio’, ‘bin’, ‘binary’].common_length #should be 2 exit

{}
PATTERN =

require “filerenamer/optionparser.rb”

/^(\D*)(\d+)(.*)$/
UNITE_CHARS =

for –unite option

{
  #### English
  ## uppercase
  "A" => "a", "B" => "b", "C" => "c", "D" => "d", "E" => "e",
  "F" => "f", "G" => "g", "H" => "h", "I" => "i", "J" => "j",
  "K" => "k", "L" => "l", "M" => "m", "N" => "n", "O" => "o",
  "P" => "p", "Q" => "q", "R" => "r", "S" => "s", "T" => "t",
  "U" => "u", "V" => "v", "W" => "w", "X" => "x", "Y" => "y",
  "Z" => "z",

  ## lowercase
  "a" => "a", "b" => "b", "c" => "c", "d" => "d", "e" => "e",
  "f" => "f", "g" => "g", "h" => "h", "i" => "i", "j" => "j",
  "k" => "k", "l" => "l", "m" => "m", "n" => "n", "o" => "o",
  "p" => "p", "q" => "q", "r" => "r", "s" => "s", "t" => "t",
  "u" => "u", "v" => "v", "w" => "w", "x" => "x", "y" => "y",
  "z" => "z",

  #### ひらがな
  ## 清音
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ## 濁音・半濁音
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ## 小字
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"",
  ""=>"", ""=>"", ""=>"",
  ""=>"",

  #### カタカナ
  ## 清音
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ## 濁音・半濁音
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"",
  ## 小字
  ""=>"", ""=>"", ""=>"", ""=>"", ""=>"",
  ""=>"",
  ""=>"", ""=>"", ""=>"",
  ""=>"",
  ## 記号
  ##"ヵ"=>"か", "ヶ"=>"け",
}
USAGE =

! /usr/bin/env ruby coding: utf-8

"Use --help option to see help."

Instance Method Summary collapse

Instance Method Details

#ppObject

op.on(“-g length”, “–greed=length”, “Greed matching for directory at least of the length.”){|v| OPTIONS = v.to_i}



9
# File 'bin/classify_greed', line 9

require "pp"