Module: Modname

Defined in:
lib/modname.rb,
lib/modname/banner.rb,
lib/modname/version.rb

Defined Under Namespace

Classes: Driver

Constant Summary collapse

HelpBanner =
"\#{'Usage:'.cyan} modname [options] <match> [transform]\n\n\#{'modname | rename files, fast'.cyan}\n\#{'--------\u253C----------------------------'.cyan}\n     -e \#{'|'.cyan} change file extensions\n     -f \#{'|'.cyan} force run; don't pre-check\n     -r \#{'|'.cyan} run modname recursively\n     -h \#{'|'.cyan} show more help, examples\n"
VHelpBanner =
"\#{Modname::HelpBanner}\n\#{'commands'.cyan}\n  file names\n    [match] [trans] => modify a pattern in filenames\n    [match] => delete a pattern from filenames\n\n  extensions (-e)\n    [old] [new] => move file extensions, <old> to <new>\n    [ext] => lowercase one extension type (EXT => ext)\n    nil => move all extensions to lower case\n\n\#{'examples'.cyan}\n  file names\n    modname hello => deletes 'hello' from all filenames\n    modname hello byebye => replace 'hello' with byebye\n\n  extensions (-e)\n    modname -e txt md => move all txt files to markdown\n    modname -e mov mp4 => move all mov files to mp4\n\n\#{'Note:'.cyan} <required> [optional]\n"
Version =
"0.2.3"

Class Method Summary collapse

Class Method Details

.run(x) ⇒ Object



12
# File 'lib/modname.rb', line 12

def run(x) Driver.new.run x end