Module: ODDB::FiParse::MiniFi

Defined in:
ext/fiparse/src/minifi.rb

Defined Under Namespace

Classes: Handler

Class Method Summary collapse

Class Method Details

.extract(filename) ⇒ Object



204
205
206
207
208
209
210
211
# File 'ext/fiparse/src/minifi.rb', line 204

def MiniFi.extract(filename)
  pdf = Rpdf2txt::Parser.new(File.read(filename), 'UTF-8')
  handler = Handler.new
  pdf.extract_text(handler)
  handler.minifis.reject { |minifi|
    minifi[:name].nil? || /ad\s*us\.\s*vet/u.match(minifi[:de].heading)
  }
end