parsefile 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parsefile.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4207991a73469c11a0cc08cc64d8e528ea6dacd3
|
4
|
+
data.tar.gz: 3c72e177ff10592694bfde02c8efdeabbf3b1530
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 987cb5344fe36abe1a56bb99f44dea893893f4073c4345ca90bc16c59f8bd1a5fe7de1a01e982dc9a162cdc7b2e9f071b4042a461585f72f1fb3038f8b5734c6
|
7
|
+
data.tar.gz: 82ed12945b157805c65fc371f58766b3ee041f82a385c445037bf7979301623e3a861580f33668f1a31b9537a6aeb2526d5b4e37ec5d98f071b7f6cd35e09f3e
|
data/lib/parsefile.rb
CHANGED
@@ -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
|
9
|
+
@path = file.unpack('C*').pack('U*')
|
10
10
|
@input_dir = input_dir
|
11
11
|
@output_dir = output_dir
|
12
12
|
# Pass URL of a Tika server
|
@@ -30,8 +30,10 @@ class ParseFile
|
|
30
30
|
|
31
31
|
gen_output
|
32
32
|
rescue
|
33
|
-
#TODO: use a global debug / log
|
34
|
-
binding.pry
|
33
|
+
# TODO: use a global debug / log
|
34
|
+
# binding.pry
|
35
|
+
error_file = @path + "\n"
|
36
|
+
IO.write(@output_dir+"/error_log.txt", error_file, mode: 'a')
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|