arxiv-references 0.1.6.2 → 0.1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arxiv/references/myUtil.rb +11 -1
- data/lib/arxiv/references/version.rb +1 -1
- 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: 6e9314573122e17ede0530dbbfb6c12599526085
|
4
|
+
data.tar.gz: dc3129175065834f39682acc58a32d63c092cda2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73c92ba3cc2b22cf0dab570d3775c99be80953ab91e1d8a08b04ac2d39c55bd001da2168a67601eb11d4ef296903c78e51c6c67afa62dd68fc1d869f3f1da719
|
7
|
+
data.tar.gz: 097321f66ddf807169960b10ade15e3bbe75b22ae1a7e3c6606c1aef1637728d6f5941a3977a00e5fb156f34ca454f6074bb2dfafc43639873b5fd56a9b8d4fd
|
@@ -39,6 +39,11 @@ module ArxivUtil
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
+
def removeFile(id, work_dir)
|
43
|
+
File.delete("#{work_dir}/#{id}-output.pdf")
|
44
|
+
File.delete("#{work_dir}/#{id}-output_k2opt.pdf")
|
45
|
+
end
|
46
|
+
|
42
47
|
|
43
48
|
def self.fetchFromUrl(urlName, work_dir, use_dir)
|
44
49
|
puts "fetch => #{urlName}"
|
@@ -88,6 +93,7 @@ module ArxivUtil
|
|
88
93
|
return getK2Pdf(job_id, work_dir, use_dir)
|
89
94
|
end
|
90
95
|
|
96
|
+
|
91
97
|
def self.fetchReference(file_name)
|
92
98
|
reader = PDF::Reader.new(file_name)
|
93
99
|
page_no = reader.
|
@@ -126,7 +132,11 @@ module ArxivUtil
|
|
126
132
|
fetchPdfFile(pdfUrl, file_name)
|
127
133
|
executed_pdf = convertSingleColPdf(job_id, work_dir, file_name, use_dir)
|
128
134
|
references = fetchReference(executed_pdf)
|
129
|
-
|
135
|
+
if use_dir
|
136
|
+
removeDir(job_id, work_dir)
|
137
|
+
else
|
138
|
+
removeFile(job_id, work_dir)
|
139
|
+
end
|
130
140
|
return references
|
131
141
|
end
|
132
142
|
end
|