class KindleCG::CLI

Public Instance Methods

check() click to toggle source
# File lib/KindleCG/cli.rb, line 29
def check
  mountpoint = options[:mountpoint] || KindleCG.os_mountpoint

  unless File.directory?(mountpoint)
    raise Thor::Error, "Could not find any kindle attached to #{mountpoint}"
    exit 1
  else
    say "Your kindle is attached to #{mountpoint}. Very good! :)", :green
  end
end
generate() click to toggle source
# File lib/KindleCG/cli.rb, line 11
def generate
  if options[:mountpoint]
    KindleCG.os_mountpoint = options[:mountpoint]
  end

  check

  kindle = Generator.new
  kindle.generate_collections
  if options[:backup]
    kindle.backup
  end
  kindle.save
end