dblp 0.5.9 → 0.5.10
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/dblp +1 -0
- data/lib/dblp/grabber.rb +9 -5
- data/lib/dblp/version.rb +2 -2
- metadata +2 -2
data/bin/dblp
CHANGED
data/lib/dblp/grabber.rb
CHANGED
@@ -43,16 +43,20 @@ module Dblp
|
|
43
43
|
if pres.size > 1
|
44
44
|
|
45
45
|
if @options && @options.crossref
|
46
|
-
result << pres[1][0].gsub(/(<.*?>)/, "").gsub(/^\s+title\s+=\s+\{(.*?)\}
|
46
|
+
result << pres[1][0].gsub(/(<.*?>)/, "").gsub(/^\s+title\s+=\s+\{(.*?)\},$/m, " title = {{\\1}},")
|
47
47
|
else
|
48
|
-
booktitle = pres[1][0].match(/^\s+title\s+=\s+\{(.*?)\}
|
48
|
+
booktitle = pres[1][0].match(/^\s+title\s+=\s+\{(.*?)\},$/m)
|
49
|
+
|
49
50
|
|
50
51
|
# If we find a booktitle, replace the book title with the
|
51
52
|
# one from the crossref
|
52
53
|
if booktitle
|
53
|
-
|
54
|
-
|
55
|
-
|
54
|
+
unless @options.short
|
55
|
+
cleantitle = booktitle[1].gsub(/\n|\t|\s+/, " ")
|
56
|
+
result[0].gsub!(/^\s+booktitle\s+=\s+\{(.*?)\},$/m){|match|
|
57
|
+
" booktitle = {{#{cleantitle}}},"
|
58
|
+
}
|
59
|
+
end
|
56
60
|
|
57
61
|
publisher = pres[1][0].match(/^\s+publisher\s+=\s+\{(.*?)\},/m)
|
58
62
|
publisher_data = publisher ? " publisher = {{#{publisher[1]}}}," : ""
|
data/lib/dblp/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dblp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|