uploadconvert 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/uploadconvert.rb +9 -6
  2. metadata +1 -1
data/lib/uploadconvert.rb CHANGED
@@ -35,13 +35,16 @@ class UploadConvert
35
35
 
36
36
  # Extract text from embedded text PDFs
37
37
  def embedPDF
38
- Docsplit.extract_text(@input, :ocr => false)
39
- outfile = @input.split(".pdf")
40
- text = File.read(outfile[0]+".txt")
38
+ begin
39
+ Docsplit.extract_text(@input, :ocr => false)
40
+ outfile = @input.split(".pdf")
41
+ text = File.read(outfile[0]+".txt")
41
42
 
42
- # Clean up text and delete file
43
- File.delete(outfile[0]+".txt")
44
- cleanPDF(text)
43
+ # Clean up text and delete file
44
+ File.delete(outfile[0]+".txt")
45
+ cleanPDF(text)
46
+ rescue
47
+ end
45
48
  end
46
49
 
47
50
  # OCR PDFs and turn that text into a JSON
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uploadconvert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: