arxiv-references 0.1.1 → 0.1.2

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: 6d6ecf380293668ea162de8c8d6bad3dc6a0258b
4
- data.tar.gz: 53e933e35501dccf7058c0fcfd5ac5b5a3069b6f
3
+ metadata.gz: ff8bba2cf9350196654a4ab2aa4935c7d72c7c35
4
+ data.tar.gz: 639122720e954ae36f82092403fc1b1c68fa24a1
5
5
  SHA512:
6
- metadata.gz: 20a51d699a186ea2a841319e020f99200f05ad9106b62c28eabe5202f1dad504a98243da699bc14adc209f1b819d5f2ceb061af8d24e34a7eba9beb4e30ffa72
7
- data.tar.gz: 2e58a8ca164fc9de13df1129e069cecd6ac677b56236f5f6b67ac70e01a912bf0480fd7dde884316164007898d5f80587226e1839971f3c76f3bbe68d0eddbd9
6
+ metadata.gz: 5cbf408e861e720b15fcab59ac13d710b39c6054331bfccf3c74d6aba7cddcd4d3a020f73e6af7f03877e0f2af97e75e57f177de914a8e73228d61075e6a317a
7
+ data.tar.gz: dbc20e54e6698778f7f6fe39a85b21e5052383d80fb3dab1759f9205e2c6b91e2d0df7248522fd7586fa2364531280d91b6db823a0c2f5664aaa2bdda775fcef
@@ -3,7 +3,6 @@
3
3
  require 'thor'
4
4
  require 'pathname'
5
5
  lib = Pathname.new(__FILE__).dirname.join().expand_path
6
- p lib.to_s
7
6
  $:.unshift lib.to_s
8
7
  require 'myUtil'
9
8
 
@@ -12,7 +11,6 @@ module ArxivReferences
12
11
  class CLI < Thor
13
12
  include ArxivUtil
14
13
  desc 'url', 'Extract references from arxiv URL'
15
- p $:
16
14
  def url(urlName)
17
15
  return ArxivUtil.fetchFromUrl(urlName)
18
16
  end
@@ -9,8 +9,8 @@ require 'nokogiri'
9
9
  require 'json'
10
10
  module ArxivUtil
11
11
  BASE_URL = "https://arxiv.org"
12
- REFERENCE_START_REGEXP = /References|REFERENCES|Reference|REFERENCE/
13
- REFERENCE_REGEXP = /(\[[0-9]?[0-9]\]|\[.+?\])/
12
+ REFERENCE_START_REGEXP = Regexp.new('References|REFERENCES|Reference|REFERENCE')
13
+ REFERENCE_REGEXP = Regexp.new('(\[[0-9]?[0-9]\]|\[.+?\])')
14
14
  def self.makeId
15
15
  return Digest::SHA256.hexdigest Time.now.strftime("%F %H:%M:%S")
16
16
  end
@@ -102,7 +102,7 @@ module ArxivUtil
102
102
  gsub('- ','').
103
103
  split("\n")
104
104
 
105
- references = ref_page[(ref_page.index(REFERENCE_START_REGEXP)+1)..ref_page.length].
105
+ references = ref_page[(ref_page.index{|i| i =~ REFERENCE_START_REGEXP}+1)..ref_page.length].
106
106
  select{|i|
107
107
  i.length > 5
108
108
  }
@@ -1,5 +1,5 @@
1
1
  module Arxiv
2
2
  module References
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takahiro Nishimura