Sha256: b8890cb2cb66f2972ccd16d5faf304308d14ae759ce01d37aa9d5a92ca1b9c59
Contents?: true
Size: 650 Bytes
Versions: 3
Compression:
Stored size: 650 Bytes
Contents
# frozen_string_literal: true require "simple_text_extract/version" require "simple_text_extract/extract" module SimpleTextExtract SUPPORTED_FILETYPES = ["xls", "xlsx", "doc", "docx", "txt", "pdf", "csv", "zip"].freeze class Error < StandardError; end def self.extract(filename: nil, raw: nil, filepath: nil, tempfile: nil) Extract.new(filename:, raw:, filepath:, tempfile:).to_s end def self.supports?(filename: nil) SUPPORTED_FILETYPES.include?(filename.to_s.split(".").last) end def self.missing_dependency?(command) dependency = `bash -c 'command -v #{command}'` dependency.nil? || dependency.empty? end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
simple_text_extract-3.0.4 | lib/simple_text_extract.rb |
simple_text_extract-3.0.3 | lib/simple_text_extract.rb |
simple_text_extract-3.0.2 | lib/simple_text_extract.rb |