dblp 0.3.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +0 -0
- data/License.txt +0 -0
- data/Manifest.txt +0 -0
- data/PostInstall.txt +0 -0
- data/README.txt +0 -0
- data/Rakefile +0 -0
- data/bin/dblp +1 -1
- data/config/hoe.rb +0 -0
- data/config/requirements.rb +0 -0
- data/lib/dblp/grabber.rb +21 -8
- data/lib/dblp/parser.rb +0 -0
- data/lib/dblp/version.rb +2 -2
- data/lib/dblp.rb +1 -0
- data/setup.rb +0 -0
- data/tasks/deployment.rake +0 -0
- data/tasks/environment.rake +0 -0
- data/tasks/website.rake +0 -0
- data/test/test.aux +0 -0
- data/test/test_dblp.rb +8 -8
- data/test/test_helper.rb +0 -0
- metadata +27 -6
data/History.txt
CHANGED
|
File without changes
|
data/License.txt
CHANGED
|
File without changes
|
data/Manifest.txt
CHANGED
|
File without changes
|
data/PostInstall.txt
CHANGED
|
File without changes
|
data/README.txt
CHANGED
|
File without changes
|
data/Rakefile
CHANGED
|
File without changes
|
data/bin/dblp
CHANGED
data/config/hoe.rb
CHANGED
|
File without changes
|
data/config/requirements.rb
CHANGED
|
File without changes
|
data/lib/dblp/grabber.rb
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
require 'open-uri'
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
|
|
3
5
|
module Dblp
|
|
4
6
|
|
|
5
7
|
class Grabber
|
|
@@ -17,13 +19,23 @@ module Dblp
|
|
|
17
19
|
|
|
18
20
|
def extract_pre(content)
|
|
19
21
|
# extract the bibtex code, that is in pre tags
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
pres = content.scan(/<pre>(.*?)<.pre>/mix)
|
|
23
|
+
|
|
24
|
+
if pres
|
|
25
|
+
|
|
26
|
+
# First handle main entry
|
|
27
|
+
result = []
|
|
28
|
+
result << pres[0][0].gsub(/(<.*?>)/, "").gsub(/^\s+title\s+=\s+\{(.*?)\},/m, " title = {{\\1}},")
|
|
29
|
+
|
|
30
|
+
# Find the crossref
|
|
31
|
+
if pres.size > 1
|
|
32
|
+
booktitle = pres[1][0].match(/^\s+title\s+=\s+\{(.*?)\},/m)
|
|
33
|
+
if booktitle
|
|
34
|
+
result[0].gsub!(/^\s+booktitle\s+=\s+\{(.*?)\},/m, " booktitle = {{#{booktitle[1]}}},")
|
|
35
|
+
result[0].gsub!(/^\s+crossref\s+=\s+\{(.*?)\},/m, "")
|
|
36
|
+
end
|
|
26
37
|
end
|
|
38
|
+
result
|
|
27
39
|
else
|
|
28
40
|
[]
|
|
29
41
|
end
|
|
@@ -37,7 +49,8 @@ module Dblp
|
|
|
37
49
|
content = read_html(DBLP_URL + key.gsub("DBLP:", ""))
|
|
38
50
|
extract_pre(content)
|
|
39
51
|
else
|
|
40
|
-
CiteseerGrabber.new.grab(key)
|
|
52
|
+
#CiteseerGrabber.new.grab(key)
|
|
53
|
+
[]
|
|
41
54
|
end
|
|
42
55
|
rescue
|
|
43
56
|
[]
|
|
@@ -61,4 +74,4 @@ module Dblp
|
|
|
61
74
|
|
|
62
75
|
end
|
|
63
76
|
|
|
64
|
-
end
|
|
77
|
+
end
|
data/lib/dblp/parser.rb
CHANGED
|
File without changes
|
data/lib/dblp/version.rb
CHANGED
data/lib/dblp.rb
CHANGED
data/setup.rb
CHANGED
|
File without changes
|
data/tasks/deployment.rake
CHANGED
|
File without changes
|
data/tasks/environment.rake
CHANGED
|
File without changes
|
data/tasks/website.rake
CHANGED
|
File without changes
|
data/test/test.aux
CHANGED
|
File without changes
|
data/test/test_dblp.rb
CHANGED
|
@@ -21,7 +21,7 @@ class TestDblp < Test::Unit::TestCase
|
|
|
21
21
|
g = Dblp::Grabber.new
|
|
22
22
|
|
|
23
23
|
res = g.grab("DBLP:conf/btw/JacobsA07")
|
|
24
|
-
assert res.size ==
|
|
24
|
+
assert res.size == 1
|
|
25
25
|
|
|
26
26
|
res = g.grab("DBLP:conf/icde/ZukowskiHNB06")
|
|
27
27
|
|
|
@@ -30,15 +30,15 @@ class TestDblp < Test::Unit::TestCase
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
def test_citeseer
|
|
33
|
+
# def test_citeseer
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
# g = Dblp::CiteseerGrabber.new
|
|
36
|
+
# res = g.grab("graefe91data")
|
|
37
|
+
# assert res.size == 1
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
# res = g.grab("nixnurnix")
|
|
40
|
+
# assert res.size == 0
|
|
41
41
|
|
|
42
|
-
end
|
|
42
|
+
# end
|
|
43
43
|
|
|
44
44
|
end
|
data/test/test_helper.rb
CHANGED
|
File without changes
|
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.
|
|
4
|
+
version: 0.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Martin Grund
|
|
@@ -9,10 +9,29 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date:
|
|
12
|
+
date: 2010-10-10 00:00:00 +02:00
|
|
13
13
|
default_executable:
|
|
14
|
-
dependencies:
|
|
15
|
-
|
|
14
|
+
dependencies:
|
|
15
|
+
- !ruby/object:Gem::Dependency
|
|
16
|
+
name: rubyforge
|
|
17
|
+
type: :development
|
|
18
|
+
version_requirement:
|
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
20
|
+
requirements:
|
|
21
|
+
- - ">="
|
|
22
|
+
- !ruby/object:Gem::Version
|
|
23
|
+
version: 2.0.4
|
|
24
|
+
version:
|
|
25
|
+
- !ruby/object:Gem::Dependency
|
|
26
|
+
name: hoe
|
|
27
|
+
type: :development
|
|
28
|
+
version_requirement:
|
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 2.6.2
|
|
34
|
+
version:
|
|
16
35
|
description: Dynamically generate the bibtex file from your citations
|
|
17
36
|
email:
|
|
18
37
|
- grundprinzip@gmail.com
|
|
@@ -49,6 +68,8 @@ files:
|
|
|
49
68
|
- test/test_helper.rb
|
|
50
69
|
has_rdoc: true
|
|
51
70
|
homepage: http://blog.grundprinzip.de
|
|
71
|
+
licenses: []
|
|
72
|
+
|
|
52
73
|
post_install_message: |+
|
|
53
74
|
|
|
54
75
|
For more information on dblp, see http://dblp.rubyforge.org
|
|
@@ -77,9 +98,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
77
98
|
requirements: []
|
|
78
99
|
|
|
79
100
|
rubyforge_project: rug-b
|
|
80
|
-
rubygems_version: 1.
|
|
101
|
+
rubygems_version: 1.3.5
|
|
81
102
|
signing_key:
|
|
82
|
-
specification_version:
|
|
103
|
+
specification_version: 3
|
|
83
104
|
summary: Dynamically generate the bibtex file from your citations
|
|
84
105
|
test_files:
|
|
85
106
|
- test/test_dblp.rb
|