arxiv-references 0.1.6.0 → 0.1.6.1

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: f0a36d9c1f438e17231af3e1f12584893253e287
4
- data.tar.gz: 68d7700f4a942e532c0639584a3c391feb2c0122
3
+ metadata.gz: 2f98d61ad3ab3665e3564ef46e200749d1eb2b8d
4
+ data.tar.gz: 03a315d483a9a1e2ec3c73dfd38eccf0104c06d4
5
5
  SHA512:
6
- metadata.gz: a56c94bce408510688871319d74f7524e5e17c3a51fe7053ae6256fb2b0ac1c4e94890cc571ca153240e049b9f3764d3388ea78dcdb523a30af390b87942edab
7
- data.tar.gz: fd90127fea1ca2368134aaedc5bce4ad80d50934c594afe9a6e34b1dc861cfd8bd34173b14a9fa8b19d7f331e0e2a5dbdb4557e2dfb86dfbed8794ffb5038ac5
6
+ metadata.gz: 4b6f4511587087594a703a6354d30efda68f46d33abcfabcc0a2bf258a910793aac607a24075fd9f5684d9b1c6fe9290fad4561405f7b4469ee76621c89925f4
7
+ data.tar.gz: fa9c34ed375be0dd83e1ae1ecd77484ed157edceaf20bc5efb37ec97c5c9fcb6834299d40929ca9614cae63a9c5aa2bb7be2257c7567311f8e096ea56c7f0f6c
@@ -12,22 +12,29 @@ module ArxivReferences
12
12
  include ArxivUtil
13
13
  desc 'url', 'Extract references from arxiv URL'
14
14
  option 'work_dir', type: :string, aliases: '-work', desc: 'Set working dir(default: /tmp)'
15
+ option 'use_dir', type: :boolean, aliases: '-use_dir', desc: 'work to make dir or not(default: true)'
15
16
  def url(urlName)
16
- puts ArxivUtil.fetchFromUrl(urlName, work_dir)
17
+ work_dir = options['work_dir'].nil? ? '/tmp' : options['work_dir']
18
+ use_dir = options['use_dir'].nil? ? true : options['use_dir']
19
+ puts ArxivUtil.fetchFromUrl(urlName, work_dir, use_dir)
17
20
  end
18
21
 
19
22
  desc 'id', 'Extract references from Arxiv id'
20
23
  option 'work_dir', type: :string, aliases: '-work', desc: 'Set working dir(default: /tmp)'
24
+ option 'use_dir', type: :boolean, aliases: '-use_dir', desc: 'work to make dir or not(default: true)'
21
25
  def arxivid(idName)
22
26
  work_dir = options['work_dir'].nil? ? '/tmp' : options['work_dir']
23
- puts ArxivUtil.fetchFromArxivId(idName, work_dir)
27
+ use_dir = options['use_dir'].nil? ? true : options['use_dir']
28
+ puts ArxivUtil.fetchFromArxivId(idName, work_dir, use_dir)
24
29
  end
25
30
 
26
31
  desc 'pdfurl', 'Extract references from pdf URL'
27
32
  option 'work_dir', type: :string, aliases: '-work', desc: 'Set working dir(default: /tmp)'
33
+ option 'use_dir', type: :boolean, aliases: '-use_dir', desc: 'work to make dir or not(default: true)'
28
34
  def pdfurl(pdfUrlName)
29
35
  work_dir = options['work_dir'].nil? ? '/tmp' : options['work_dir']
30
- puts ArxivUtil.fetchFromPdfUrl(pdfUrlName, work_dir)
36
+ use_dir = options['use_dir'].nil? ? true : options['use_dir']
37
+ puts ArxivUtil.fetchFromPdfUrl(pdfUrlName, work_dir, use_dir)
31
38
  end
32
39
  end
33
40
  end
@@ -58,9 +58,9 @@ module ArxivUtil
58
58
  return result.to_json
59
59
  end
60
60
 
61
- def self.fetchFromArxivId(id, work_dir)
61
+ def self.fetchFromArxivId(id, work_dir, use_dir)
62
62
  target_url = "#{BASE_URL}/abs/#{id}"
63
- fetchFromUrl(target_url, work_dir)
63
+ fetchFromUrl(target_url, work_dir, use_dir)
64
64
  end
65
65
 
66
66
  def self.fetchPdfFile(pdfUrl,file_name)
@@ -1,5 +1,5 @@
1
1
  module Arxiv
2
2
  module References
3
- VERSION = "0.1.6.0"
3
+ VERSION = "0.1.6.1"
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.0
4
+ version: 0.1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takahiro Nishimura