parsefile 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ocrfile.rb +3 -1
  3. data/lib/parsefile.rb +4 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4207991a73469c11a0cc08cc64d8e528ea6dacd3
4
- data.tar.gz: 3c72e177ff10592694bfde02c8efdeabbf3b1530
3
+ metadata.gz: b5bf09e69f1851e80512b7839555716e341c046e
4
+ data.tar.gz: 734a807444328107153a734c18aeba18676354fa
5
5
  SHA512:
6
- metadata.gz: 987cb5344fe36abe1a56bb99f44dea893893f4073c4345ca90bc16c59f8bd1a5fe7de1a01e982dc9a162cdc7b2e9f071b4042a461585f72f1fb3038f8b5734c6
7
- data.tar.gz: 82ed12945b157805c65fc371f58766b3ee041f82a385c445037bf7979301623e3a861580f33668f1a31b9537a6aeb2526d5b4e37ec5d98f071b7f6cd35e09f3e
6
+ metadata.gz: 27d5719e889e4d2b883ea5809eee139707c0510210413752436ffd93be164a168866bdd73578af2d88b9a66ff5dd8e0e1510176c207139143234d558055d8788
7
+ data.tar.gz: 698a87c083f2ffcfa7057d3dc1fc143c384f7aeb7499dd8ff7453040ec9f8f84301d8c4eccad5c6ed4b37d3224f7d017fc4b8fd4fa1e15b59519e5f8c09a9011
@@ -27,7 +27,9 @@ class OCRFile
27
27
  end
28
28
  rescue
29
29
  # Detect errors
30
- binding.pry
30
+ # binding.pry
31
+ error_file = @path + "\n"
32
+ IO.write(@output_dir+"/error_log.txt", error_file, mode: 'a')
31
33
  end
32
34
 
33
35
  return @text
@@ -6,7 +6,7 @@ require 'extractmetadata'
6
6
 
7
7
  class ParseFile
8
8
  def initialize(file, input_dir, output_dir, tika)
9
- @path = file.unpack('C*').pack('U*')
9
+ @path = file
10
10
  @input_dir = input_dir
11
11
  @output_dir = output_dir
12
12
  # Pass URL of a Tika server
@@ -21,8 +21,9 @@ class ParseFile
21
21
  def parse_file
22
22
  begin
23
23
  puts "sending file: " + @path
24
-
25
- m = ExtractMetadata.new(@path, @input_dir, @output_dir)
24
+
25
+ path_fix = @path.unpack('C*').pack('U*')
26
+ m = ExtractMetadata.new(path_fix, @input_dir, @output_dir)
26
27
  @metadata = m.extract
27
28
 
28
29
  o = OCRFile.new(@path, @input_dir, @output_dir, @metadata[:rel_path], @tika)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parsefile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - M. C. McGrath