Class: PaperlessOCR::DevonThinkPro
- Inherits:
-
Object
- Object
- PaperlessOCR::DevonThinkPro
- Defined in:
- lib/paperless/ocr_engines/devonthinkpro.rb
Instance Method Summary collapse
-
#initialize ⇒ DevonThinkPro
constructor
A new instance of DevonThinkPro.
- #ocr(options) ⇒ Object
Constructor Details
#initialize ⇒ DevonThinkPro
Returns a new instance of DevonThinkPro.
10 11 12 13 14 |
# File 'lib/paperless/ocr_engines/devonthinkpro.rb', line 10 def initialize @engine = PaperlessOCR::DEVONTHINKPRO @app = app(@engine) @app.activate end |
Instance Method Details
#ocr(options) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/paperless/ocr_engines/devonthinkpro.rb', line 16 def ocr() begin app("System Events").processes[@engine].visible.set(false) @app.ocr(:file => [:file]) rescue puts "WARNING: There was an error OCRing the document with #{@engine}: #{$!}" end end |