Sha256: f9903eae020c2b67f9b8c712928e2057ca571eaf58c6b87a5a35639af51f5239

Contents?: true

Size: 406 Bytes

Versions: 1

Compression:

Stored size: 406 Bytes

Contents

# !/usr/bin/env ruby
require 'colorize'

require_relative "../lib/ocr_space/convert"

if ARGV.empty?
  puts "You need to mention the image path".colorize(:red)
else
  begin
    resource = OcrSpace::Resource.new
    result = resource.convert file: ARGV[0]
    puts result[0]['ParsedText'].delete("\n").delete("\r").strip
  rescue
     puts "Something went wrong, Please try again.".colorize(:red)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ocr_space-2.2 exe/ocrspace