marc2solr 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +5 -0
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/bin/marc2solr +17 -8
- data/lib/marc2solr.rb +2 -1
- metadata +161 -184
data/CHANGES
CHANGED
data/Rakefile
CHANGED
@@ -13,7 +13,7 @@ begin
|
|
13
13
|
|
14
14
|
gem.add_dependency 'marc4j4r', '>= 1.3.0'
|
15
15
|
gem.add_dependency 'jruby_streaming_update_solr_server', '>=0.5.2'
|
16
|
-
gem.add_dependency 'marcspec', '>= 1.6.
|
16
|
+
gem.add_dependency 'marcspec', '>= 1.6.6'
|
17
17
|
gem.add_dependency 'threach', '>= 0.2.0'
|
18
18
|
gem.add_dependency 'jlogger', '>=0.0.4'
|
19
19
|
gem.add_dependency 'library_stdnums', '>=0.2.0'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
data/bin/marc2solr
CHANGED
@@ -105,20 +105,29 @@ when "index"
|
|
105
105
|
opts.print_command_help('index')
|
106
106
|
end
|
107
107
|
|
108
|
+
# Make sure we've got an indexfile
|
109
|
+
unless opts[:indexfile]
|
110
|
+
LOG.error "Index configuration file (index.rb) is rquired."
|
111
|
+
raise ArgumentError, "Index configuraiton file (index.rb) is required"
|
112
|
+
end
|
108
113
|
|
109
114
|
# Make sure everything can be opened
|
110
|
-
|
115
|
+
if File.readable? opts[:indexfile]
|
116
|
+
LOG.debug "Found index file #{opts[:indexfile]}"
|
117
|
+
else
|
111
118
|
LOG.error "Index configuration file '#{opts[:indexfile]}' (set with --indexfile) cannot be found/read"
|
112
119
|
raise ArgumentError, "Index configuration file '#{opts[:indexfile]}' (set with --indexfile) cannot be found/read"
|
113
|
-
else
|
114
|
-
LOG.debug "Found index file #{opts[:indexfile]}"
|
115
120
|
end
|
116
121
|
|
117
|
-
|
118
|
-
|
119
|
-
|
122
|
+
if opts[:tmapdir]
|
123
|
+
if File.readable? opts[:tmapdir]
|
124
|
+
LOG.debug "Found translation maps directory #{opts[:tmapdir]}"
|
125
|
+
else
|
126
|
+
LOG.error "Translation Map directory '#{opts[:tmapdir]}' (set with --tmapdir) cannot be found/read"
|
127
|
+
raise ArgumentError, "Translation Map directory '#{opts[:tmapdir]}' (set with --tmapdir) cannot be found/read"
|
128
|
+
end
|
120
129
|
else
|
121
|
-
LOG.
|
130
|
+
LOG.warn "No translation maps defined; hope that's what you intended"
|
122
131
|
end
|
123
132
|
|
124
133
|
marcfiles.each do |filename|
|
@@ -161,7 +170,7 @@ when "index"
|
|
161
170
|
# Create a specset
|
162
171
|
|
163
172
|
ss = MARCSpec::SpecSet.new
|
164
|
-
ss.loadMapsFromDir opts[:tmapdir]
|
173
|
+
ss.loadMapsFromDir opts[:tmapdir] if opts[:tmapdir]
|
165
174
|
ss.buildSpecsFromDSLFile opts[:indexfile]
|
166
175
|
|
167
176
|
# Set up if we're using threach or not
|
data/lib/marc2solr.rb
CHANGED
@@ -81,6 +81,7 @@ module MARC2Solr
|
|
81
81
|
:type => :int}],
|
82
82
|
[:solrpath, {:desc => "URL path to solr",
|
83
83
|
:short => '-P',
|
84
|
+
:type => String,
|
84
85
|
}],
|
85
86
|
[:javabin, {:desc => "Use javabin (presumes /update/bin is configured in schema.xml)",
|
86
87
|
}],
|
@@ -362,7 +363,7 @@ module MARC2Solr
|
|
362
363
|
raise ArgumentError, "Need solr path (--solrpath)"
|
363
364
|
end
|
364
365
|
|
365
|
-
url = 'http://' + machine + ':' + port + '/' + path.gsub(/^\//, '')
|
366
|
+
url = 'http://' + machine + ':' + port.to_s + '/' + path.gsub(/^\//, '')
|
366
367
|
end
|
367
368
|
|
368
369
|
def suss
|
metadata
CHANGED
@@ -1,222 +1,199 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marc2solr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 23
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
version: 0.1.
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 7
|
9
|
+
version: 0.1.7
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
|
-
- BillDueber
|
12
|
+
- BillDueber
|
14
13
|
autorequire:
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2010-10-
|
17
|
+
date: 2010-10-18 00:00:00 -04:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
- !ruby/object:Gem::
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
- 9
|
144
|
-
version: 1.2.9
|
145
|
-
type: :development
|
146
|
-
version_requirements: *id008
|
147
|
-
- !ruby/object:Gem::Dependency
|
148
|
-
name: yard
|
149
|
-
prerelease: false
|
150
|
-
requirement: &id009 !ruby/object:Gem::Requirement
|
151
|
-
none: false
|
152
|
-
requirements:
|
153
|
-
- - ">="
|
154
|
-
- !ruby/object:Gem::Version
|
155
|
-
hash: 3
|
156
|
-
segments:
|
157
|
-
- 0
|
158
|
-
version: "0"
|
159
|
-
type: :development
|
160
|
-
version_requirements: *id009
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: marc4j4r
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 3
|
30
|
+
- 0
|
31
|
+
version: 1.3.0
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: jruby_streaming_update_solr_server
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
- 5
|
44
|
+
- 2
|
45
|
+
version: 0.5.2
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: marcspec
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 1
|
57
|
+
- 6
|
58
|
+
- 6
|
59
|
+
version: 1.6.6
|
60
|
+
type: :runtime
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: threach
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
segments:
|
70
|
+
- 0
|
71
|
+
- 2
|
72
|
+
- 0
|
73
|
+
version: 0.2.0
|
74
|
+
type: :runtime
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: jlogger
|
78
|
+
prerelease: false
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
segments:
|
84
|
+
- 0
|
85
|
+
- 0
|
86
|
+
- 4
|
87
|
+
version: 0.0.4
|
88
|
+
type: :runtime
|
89
|
+
version_requirements: *id005
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: library_stdnums
|
92
|
+
prerelease: false
|
93
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
segments:
|
98
|
+
- 0
|
99
|
+
- 2
|
100
|
+
- 0
|
101
|
+
version: 0.2.0
|
102
|
+
type: :runtime
|
103
|
+
version_requirements: *id006
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: trollop
|
106
|
+
prerelease: false
|
107
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
segments:
|
112
|
+
- 0
|
113
|
+
version: "0"
|
114
|
+
type: :runtime
|
115
|
+
version_requirements: *id007
|
116
|
+
- !ruby/object:Gem::Dependency
|
117
|
+
name: rspec
|
118
|
+
prerelease: false
|
119
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
segments:
|
124
|
+
- 1
|
125
|
+
- 2
|
126
|
+
- 9
|
127
|
+
version: 1.2.9
|
128
|
+
type: :development
|
129
|
+
version_requirements: *id008
|
130
|
+
- !ruby/object:Gem::Dependency
|
131
|
+
name: yard
|
132
|
+
prerelease: false
|
133
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
segments:
|
138
|
+
- 0
|
139
|
+
version: "0"
|
140
|
+
type: :development
|
141
|
+
version_requirements: *id009
|
161
142
|
description: Given a file of MARC records, send them to Sorl for indexing based on a set of MARCSpecs
|
162
143
|
email: bill@dueber.com
|
163
144
|
executables:
|
164
|
-
- marc2solr
|
165
|
-
- solrmarc_to_marc2solr
|
145
|
+
- marc2solr
|
146
|
+
- solrmarc_to_marc2solr
|
166
147
|
extensions: []
|
167
148
|
|
168
149
|
extra_rdoc_files:
|
169
|
-
- LICENSE
|
170
|
-
- README.md
|
150
|
+
- LICENSE
|
151
|
+
- README.md
|
171
152
|
files:
|
172
|
-
- .document
|
173
|
-
- .gitignore
|
174
|
-
- CHANGES
|
175
|
-
- LICENSE
|
176
|
-
- README.md
|
177
|
-
- Rakefile
|
178
|
-
- VERSION
|
179
|
-
- bin/marc2solr
|
180
|
-
- bin/solrmarc_to_marc2solr
|
181
|
-
- lib/marc2solr.rb
|
182
|
-
- lib/marc2solr/marc2solr_custom.rb
|
183
|
-
- spec/marc2solr_spec.rb
|
184
|
-
- spec/spec.opts
|
185
|
-
- spec/spec_helper.rb
|
153
|
+
- .document
|
154
|
+
- .gitignore
|
155
|
+
- CHANGES
|
156
|
+
- LICENSE
|
157
|
+
- README.md
|
158
|
+
- Rakefile
|
159
|
+
- VERSION
|
160
|
+
- bin/marc2solr
|
161
|
+
- bin/solrmarc_to_marc2solr
|
162
|
+
- lib/marc2solr.rb
|
163
|
+
- lib/marc2solr/marc2solr_custom.rb
|
164
|
+
- spec/marc2solr_spec.rb
|
165
|
+
- spec/spec.opts
|
166
|
+
- spec/spec_helper.rb
|
186
167
|
has_rdoc: true
|
187
168
|
homepage: http://github.com/billdueber/marc2solr
|
188
169
|
licenses: []
|
189
170
|
|
190
171
|
post_install_message:
|
191
172
|
rdoc_options:
|
192
|
-
- --charset=UTF-8
|
173
|
+
- --charset=UTF-8
|
193
174
|
require_paths:
|
194
|
-
- lib
|
175
|
+
- lib
|
195
176
|
required_ruby_version: !ruby/object:Gem::Requirement
|
196
|
-
none: false
|
197
177
|
requirements:
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
version: "0"
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
segments:
|
181
|
+
- 0
|
182
|
+
version: "0"
|
204
183
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
|
-
none: false
|
206
184
|
requirements:
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
version: "0"
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
segments:
|
188
|
+
- 0
|
189
|
+
version: "0"
|
213
190
|
requirements: []
|
214
191
|
|
215
192
|
rubyforge_project:
|
216
|
-
rubygems_version: 1.3.
|
193
|
+
rubygems_version: 1.3.6
|
217
194
|
signing_key:
|
218
195
|
specification_version: 3
|
219
196
|
summary: "MARC2Solr: Get MARC into Solr via JRuby"
|
220
197
|
test_files:
|
221
|
-
- spec/marc2solr_spec.rb
|
222
|
-
- spec/spec_helper.rb
|
198
|
+
- spec/marc2solr_spec.rb
|
199
|
+
- spec/spec_helper.rb
|