class ImageParadise::ToJpg

Constants

NAMESPACE
#

NAMESPACE

#

Public Class Methods

new( i = ARGV, run_already = true ) click to toggle source
#

initialize

#
# File lib/image_paradise/utility_scripts/to_jpg.rb, line 31
def initialize(
    i           = ARGV,
    run_already = true
  )
  reset
  set_commandline_arguments(i)
  run if run_already
end

Public Instance Methods

reset() click to toggle source
#

reset (reset tag)

#
# File lib/image_paradise/utility_scripts/to_jpg.rb, line 43
def reset
  # ======================================================================= #
  # === @namespace
  # ======================================================================= #
  @namespace = NAMESPACE
end
return_where_to_store_this(i) click to toggle source
#

return_where_to_store_this

#
# File lib/image_paradise/utility_scripts/to_jpg.rb, line 53
def return_where_to_store_this(i)
  i.gsub(File.extname(i),'')+
  '.jpg' # Store as .jpg, logically.
end
run() click to toggle source
#

run (run tag)

#
# File lib/image_paradise/utility_scripts/to_jpg.rb, line 73
def run
  run_everything
end
run_everything() click to toggle source
#

run_everything

#
# File lib/image_paradise/utility_scripts/to_jpg.rb, line 61
def run_everything
  commandline_arguments?.each {|this_file|
    store_where = return_where_to_store_this(this_file)
    opnn; e 'Next converting '+simp(this_file)+' to '+sfile(store_where)
    _ = 'convert '+this_file+' '+store_where
    esystem _
  }
end