arxiv-references 0.1.7.1 → 0.1.7.2
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/P3.rb +4 -2
- 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: bb581758f88e406a624f1dae98870494eaea6714
|
4
|
+
data.tar.gz: 74f0964fb8e44e7d05a1cf5ffdb3628cba85c115
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74492073e8e5ef76774e365b8bfe429e0c373f4a236b9200bddddaa7b63a0489ecc3fa4fd3bc88cc8956b4df6a70e81cef39776a30a3fba047b5bea9d6c8a7d5
|
7
|
+
data.tar.gz: 91c8231fb8dbadcd69f008ae6800b0306bfb6edfbf968a24b9d4a1d21e0eee28fee89dfd73b6c06665eb23f7f1f058a543fc151b2a52f911961e45c7874094af
|
data/lib/arxiv/references/P3.rb
CHANGED
@@ -7,7 +7,7 @@ require 'pdf-reader'
|
|
7
7
|
|
8
8
|
class P3
|
9
9
|
BASE_URL = "https://arxiv.org"
|
10
|
-
REFERENCE_START_REGEXP = Regexp.new('[rR][eE][fF][eE][rR][eE][nN][cC][eE][sS]
|
10
|
+
REFERENCE_START_REGEXP = Regexp.new('\n*[rR][eE][fF][eE][rR][eE][nN][cC][eE][sS]?( +|\n+)?$')
|
11
11
|
REFERENCE_REGEXP = Regexp.new('(\[[0-9]?[0-9]\]|\[.+?\])')
|
12
12
|
def self.makeId
|
13
13
|
return Digest::SHA256.hexdigest Time.now.strftime("%F %H:%M:%S")
|
@@ -84,7 +84,9 @@ class P3
|
|
84
84
|
}.
|
85
85
|
map{|i|
|
86
86
|
i.text.gsub(/\n\n+/,"\n").gsub(/ +/,' ').gsub(/-\n +/,'')
|
87
|
-
}
|
87
|
+
}
|
88
|
+
ref_page.shift
|
89
|
+
ref_page.
|
88
90
|
join(' ').
|
89
91
|
split("\n").
|
90
92
|
join(' ').
|