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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06f35757a5d645188c7bcf5a75d9cfdf8461fabc
4
- data.tar.gz: 9c6a1cb6c7a79f68d2f90033669f0f813cf24718
3
+ metadata.gz: 6e9314573122e17ede0530dbbfb6c12599526085
4
+ data.tar.gz: dc3129175065834f39682acc58a32d63c092cda2
5
5
  SHA512:
6
- metadata.gz: 13816c4a96e29512a47ac03a6c25c9178a7dd6944a7a5c4ef56612d41cc60061fd5845d7d2131b9c86f5741111465c099ef8d6559b58da3d9dac28c0ac1cb173
7
- data.tar.gz: e88505e60aec508ddf8d7d4b9bdbad8806fe684624a175ede30d8972585706fa9ab2d8de1f45f5fdb749f2f74c111148e2776d684dfbfc06739eef95c6786d5b
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
- removeDir(job_id, work_dir) unless use_dir
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
@@ -1,5 +1,5 @@
1
1
  module Arxiv
2
2
  module References
3
- VERSION = "0.1.6.2"
3
+ VERSION = "0.1.6.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arxiv-references
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6.2
4
+ version: 0.1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takahiro Nishimura