zcc 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +16 -0
- data/Manifest.txt +4 -4
- data/Rakefile +1 -1
- data/bin/zcc +352 -228
- data/examples/zcc.yaml +62 -34
- data/examples/zebra/accessfile +1 -0
- data/examples/zebra/records/0.xml +1 -0
- data/examples/zebra/shadow/remove_me +1 -0
- data/examples/zebra/tab/bib1.att +9 -56
- data/examples/zebra/tab/record.abs +215 -44
- data/examples/zebra/zcc_passw +1 -0
- data/examples/zebra/zebra.cfg +20 -15
- data/lib/zcc/cli_display.rb +64 -42
- data/lib/zcc/query.rb +30 -27
- data/lib/zcc/record.rb +38 -3
- data/lib/zcc/resultset.rb +1 -0
- data/lib/zcc/version.rb +1 -1
- data/website/index.html +7 -5
- data/website/index.txt +2 -2
- data/website/koha.html +32 -19
- data/website/koha.txt +3 -3
- data/website/stylesheets/screen.css +2 -2
- data/website/zcc.html +86 -34
- data/website/zcc.txt +49 -28
- data/website/zebra.html +15 -46
- data/website/zebra.txt +11 -47
- metadata +8 -8
- data/examples/zebra/records/0.mrc +0 -1
- data/examples/zebra/tab/marc21.abs +0 -67
- data/lib/zcc/subfieldeditor.rb +0 -70
- data/lib/zcc/zoomer.rb +0 -86
@@ -0,0 +1 @@
|
|
1
|
+
zcc:same01Dsong
|
data/examples/zebra/zebra.cfg
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
# ZCC
|
2
1
|
# Simple Zebra configuration file that defines
|
3
|
-
#
|
2
|
+
# a database with MARCXML records.
|
4
3
|
#
|
5
4
|
# Where are the config files located?
|
6
|
-
profilePath
|
5
|
+
profilePath:tab
|
7
6
|
# modulePath - where to look for loadable zebra modules
|
8
7
|
modulePath: /usr/lib/idzebra-2.0/modules
|
9
8
|
|
@@ -15,25 +14,31 @@ attset: gils.att
|
|
15
14
|
|
16
15
|
# systag sysno rank
|
17
16
|
# Specify record type
|
18
|
-
|
19
|
-
|
20
|
-
storeKeys: 1
|
17
|
+
recordType:grs.xml
|
18
|
+
recordId: (bib1,Local-number)
|
21
19
|
|
22
|
-
|
23
|
-
|
20
|
+
storeKeys:1
|
21
|
+
storeData:1
|
24
22
|
|
23
|
+
database: zcc
|
25
24
|
|
26
25
|
# Lock File Area
|
27
|
-
lockDir:
|
28
|
-
|
29
|
-
|
26
|
+
lockDir: lock
|
27
|
+
|
28
|
+
# You will most likely only want to give anonymous access read privileges.
|
29
|
+
# In testing leaving off the anonymous user still allows anonymous search!
|
30
|
+
perm.anonymous:ar
|
31
|
+
perm.zcc:rw
|
32
|
+
passwd: zcc_passw
|
33
|
+
dbaccess: accessfile
|
34
|
+
|
35
|
+
register: register:1G
|
36
|
+
shadow: shadow:1G
|
30
37
|
|
31
|
-
# Temp File area for result sets
|
32
|
-
setTmpDir: /home/jason/.zcc/zebra/tmp
|
33
38
|
|
34
39
|
# Temp File area for index program
|
35
|
-
keyTmpDir:
|
40
|
+
keyTmpDir: key
|
36
41
|
|
37
42
|
# Approx. Memory usage during indexing
|
38
|
-
memMax:
|
43
|
+
memMax: 125M
|
39
44
|
rank:rank-1
|
data/lib/zcc/cli_display.rb
CHANGED
@@ -4,8 +4,10 @@ module ZCC
|
|
4
4
|
#puts self[0]
|
5
5
|
unless results.is_a? ZCC::ResultSet
|
6
6
|
raise ArgumentError, "This Array doesn't have a MARC::Record!"
|
7
|
-
end
|
8
|
-
|
7
|
+
end
|
8
|
+
rec_copy = results.records
|
9
|
+
recs_length = rec_copy.length
|
10
|
+
index_range = (0..recs_length - 1)
|
9
11
|
clear = %x{clear}
|
10
12
|
|
11
13
|
# Help statements:
|
@@ -53,7 +55,7 @@ module ZCC
|
|
53
55
|
Sorting reindexes the result set and removes nil values.
|
54
56
|
E_O_F
|
55
57
|
|
56
|
-
help_c = "Compare two records.\nCompares the records line by line.\nLines with an 'm' match each other.\nLines with a plus sign are in the first record but not the second. Lines with a minus sign '-' are from the second record but not the first.\nEven the difference of a period matters here.\n>
|
58
|
+
help_c = "Compare two records.\nCompares the records line by line.\nLines with an 'm' match each other.\nLines with a plus sign are in the first record but not the second. Lines with a minus sign '-' are from the second record but not the first.\nEven the difference of a period matters here.\n> c [ENTER] 4-2"
|
57
59
|
help_l = "Lint the record.\nCheck for errors such as wrong indicator values or poor punctuation.\n> l5"
|
58
60
|
|
59
61
|
help_f = "Forwards through the result set.\nThe number of results shown per page is configured in zcc.yaml."
|
@@ -73,7 +75,7 @@ module ZCC
|
|
73
75
|
|
74
76
|
|
75
77
|
loop do
|
76
|
-
|
78
|
+
|
77
79
|
choose do |menu|
|
78
80
|
print $clear_code
|
79
81
|
|
@@ -93,12 +95,16 @@ module ZCC
|
|
93
95
|
end
|
94
96
|
#puts "\n\n"
|
95
97
|
end
|
96
|
-
|
97
|
-
|
98
|
+
|
99
|
+
#convenience to show whole record in the case that there's only one
|
100
|
+
if recs_length == 1
|
101
|
+
say("#{ZCC.zcc_marc_str_bold(rec_copy[0].to_s, 'record')}")
|
102
|
+
end
|
98
103
|
|
99
|
-
|
100
|
-
|
104
|
+
puts "Highest position: " + (results.size - 1).to_s
|
105
|
+
say("\aYou are currently in the winnowing stage.\nWinnow your choices with 'unselect' or 'remove'.\nEnter 'done' if you want to process all selected records\nor if no records are selected you will be returned to a search.\n".bold) if take_how_many == 'winnow'
|
101
106
|
|
107
|
+
|
102
108
|
menu.hidden("help", help_help) do |cmd, d|
|
103
109
|
if d == ''
|
104
110
|
say_help(help_help)
|
@@ -181,10 +187,12 @@ module ZCC
|
|
181
187
|
if range_a[1]
|
182
188
|
for r in range_a[0]..range_a[1]
|
183
189
|
rec_copy[r] = nil if rec_copy[r]
|
190
|
+
#return
|
184
191
|
end
|
185
192
|
else
|
186
193
|
rec_copy[range_a[0]] = nil
|
187
|
-
|
194
|
+
#return
|
195
|
+
end
|
188
196
|
end
|
189
197
|
menu.hidden(:remove, help_r) { |cmd, d| say_help(help_r) }
|
190
198
|
|
@@ -225,23 +233,12 @@ module ZCC
|
|
225
233
|
end
|
226
234
|
|
227
235
|
# compare
|
228
|
-
menu.hidden(:
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
for y in (0..recs_length-1)
|
235
|
-
unless x == y
|
236
|
-
comparison << 'c' + x.to_s + '-' + y.to_s
|
237
|
-
end
|
238
|
-
end
|
239
|
-
end
|
240
|
-
comparison.each do |compare|
|
241
|
-
menu.hidden(compare, help_c) do |cmd, details|
|
242
|
-
cmd = cmd[1,99]
|
243
|
-
compare_nums = cmd.split('-')
|
244
|
-
if rec_copy[compare_nums[0].to_i] == nil || rec_copy[compare_nums[1].to_i] == nil
|
236
|
+
menu.hidden(:compare, help_c){|c,d| say_help(help_c)}
|
237
|
+
menu.choice(:c, help_c) do |c,d|
|
238
|
+
say(help_c)
|
239
|
+
comparitors = ask("Enter the two to compare. 1-2 compares record 1 to record 2.".boldz)
|
240
|
+
compare_nums = comparitors.split('-').collect{|i| i.to_i}
|
241
|
+
if rec_copy[compare_nums[0].to_i] == nil || rec_copy[compare_nums[1].to_i] == nil
|
245
242
|
say_help("One of the records has been removed!")
|
246
243
|
else
|
247
244
|
say("comparison:".headline)
|
@@ -249,8 +246,33 @@ module ZCC
|
|
249
246
|
ask("Hit ENTER to continue...".headlinez)
|
250
247
|
next
|
251
248
|
end
|
252
|
-
end
|
253
249
|
end
|
250
|
+
#this always gave an Ambiguous choice error in many cases for instance c1-2 would throw the Highline error. Would like to get this to work as originally intended.
|
251
|
+
#menu.choice('c#-#', help_c) do |command, details|
|
252
|
+
# say_help(help_c)
|
253
|
+
#end
|
254
|
+
# comparison = []
|
255
|
+
# for x in (0..recs_length-1)
|
256
|
+
# for y in (0..recs_length-1)
|
257
|
+
# unless x == y
|
258
|
+
# comparison << 'c' + x.to_s + '-' + y.to_s
|
259
|
+
# end
|
260
|
+
# end
|
261
|
+
# end
|
262
|
+
# comparison.each do |compare|
|
263
|
+
# menu.hidden(compare, help_c) do |cmd, details|
|
264
|
+
# cmd = cmd[1,99]
|
265
|
+
# compare_nums = cmd.split('-')
|
266
|
+
# if rec_copy[compare_nums[0].to_i] == nil || rec_copy[compare_nums[1].to_i] == nil
|
267
|
+
# say_help("One of the records has been removed!")
|
268
|
+
# else
|
269
|
+
# say("comparison:".headline)
|
270
|
+
# compare_marc(rec_copy[compare_nums[0].to_i], rec_copy[compare_nums[1].to_i])
|
271
|
+
# ask("Hit ENTER to continue...".headlinez)
|
272
|
+
# next
|
273
|
+
# end
|
274
|
+
# end
|
275
|
+
# end
|
254
276
|
|
255
277
|
# lint
|
256
278
|
menu.hidden(:l, help_l){|c,d| say_help(help_l)}
|
@@ -301,7 +323,7 @@ module ZCC
|
|
301
323
|
end
|
302
324
|
|
303
325
|
# quit
|
304
|
-
menu.choice(:quit, "Exit program.") { |cmd, d|
|
326
|
+
menu.choice(:quit, "Exit program.") { |cmd, d| return 'quit'}
|
305
327
|
|
306
328
|
# none -- only for final record taking. not currently used
|
307
329
|
if take_how_many == 'one'
|
@@ -444,18 +466,18 @@ end
|
|
444
466
|
# Override HighLine's own defaults so that our large menu options do not display.
|
445
467
|
# This needs work to have better help for these error messages.
|
446
468
|
|
447
|
-
class Highline
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
end
|
460
|
-
|
469
|
+
class Highline
|
470
|
+
class Menu
|
471
|
+
def update_responses( )
|
472
|
+
append_default unless default.nil?
|
473
|
+
@responses = {
|
474
|
+
:ambiguous_completion => "Ambiguous choice. ",
|
475
|
+
:ask_on_error => "? ",
|
476
|
+
:invalid_type => "You must enter a valid option.", :no_completion => "You must pick a valid option.", :not_in_range => "You must input a valid option." ,
|
477
|
+
:not_valid => "You must have a valid option."
|
478
|
+
}.merge(@responses)
|
479
|
+
end
|
480
|
+
end
|
481
|
+
end
|
482
|
+
|
461
483
|
|
data/lib/zcc/query.rb
CHANGED
@@ -31,7 +31,7 @@ module ZCC
|
|
31
31
|
term = term.split(" :au ")
|
32
32
|
puts "Author and title then"
|
33
33
|
@term = term[0]
|
34
|
-
@zsearch = "@and @attr 1=4 \"#{@term}\" @attr 1=1 \"#{term[1]}
|
34
|
+
@zsearch = "@and @attr 1=4 \"#{@term}\" @attr 1=1 \"#{term[1]}\"" #was: "@attr 1=4 \"'#{@term}'\""
|
35
35
|
else
|
36
36
|
@term = term
|
37
37
|
@zsearch = "@attr 1=4 \"#{@term}\"" #was: "@attr 1=4 \"'#{@term}'\""
|
@@ -61,31 +61,32 @@ module ZCC
|
|
61
61
|
#puts server.to_s
|
62
62
|
search_threads << Thread.new(server, z) do |myserver, myz|
|
63
63
|
begin
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
64
|
+
ZOOM::Connection.open("#{myserver.host}:#{server.port}/#{myserver.database}") do |conn|
|
65
|
+
#conn.connect(myserver.host, server.port) #do |conn
|
66
|
+
conn.set_option('charset', 'UTF-8')
|
67
|
+
conn.preferred_record_syntax = 'MARC21'
|
68
|
+
puts "#{myz} Searching: #{myserver.to_s} | #{self.zsearch}"
|
69
|
+
rset = conn.search(self.zsearch)
|
70
|
+
say(myz.to_s.headline + " Finished searching: #{myserver.to_s} | rset.size: " + "#{rset.size}".red.bold)
|
71
|
+
rset_recs = rset[0, show]
|
72
|
+
#puts "rset_recs in query.search: "
|
73
|
+
#puts rset_recs
|
74
|
+
i = 0
|
75
|
+
rset_recs.each do |rec|
|
76
|
+
#puts myserver.to_s
|
77
|
+
#puts rec
|
78
|
+
#puts
|
79
|
+
marc_record = ZCC.convert_char(rec)
|
80
|
+
#puts "gets past character conversion"
|
81
|
+
#puts "-------------\n"
|
82
|
+
#puts marc_record
|
83
|
+
#puts "---------------\n"
|
84
|
+
zcc_record = Record.new(marc_record, myserver)
|
85
|
+
result_set.ingest(zcc_record)
|
86
|
+
puts "#{myz} record #{i} from #{myserver}..."
|
87
|
+
i += 1
|
88
|
+
end
|
89
|
+
conn = nil
|
89
90
|
end
|
90
91
|
rescue Exception => e
|
91
92
|
zerror_log("dead thread: " + myserver.to_s + " | " + e)
|
@@ -101,8 +102,10 @@ module ZCC
|
|
101
102
|
end
|
102
103
|
|
103
104
|
alias search zoom
|
105
|
+
|
106
|
+
#FIXME probably should move this to a different class that contants more cli stuff
|
104
107
|
def zerror_log error
|
105
|
-
File.open("#{
|
108
|
+
File.open("#{ROOT}/zerror_log", "a+") do |f|
|
106
109
|
f.write error + "\n"
|
107
110
|
end
|
108
111
|
end
|
data/lib/zcc/record.rb
CHANGED
@@ -59,7 +59,7 @@ module ZCC
|
|
59
59
|
puts 'You do not have the Perl MARC::Lint module installed or have disabled this feature.'
|
60
60
|
return
|
61
61
|
end
|
62
|
-
contents = `perl "#{
|
62
|
+
contents = `perl "#{ROOT}"/linter.pl "#{xml_rec}"`
|
63
63
|
if contents.empty?
|
64
64
|
puts "there were no errors detected by the linter."
|
65
65
|
else
|
@@ -209,7 +209,34 @@ module ZCC
|
|
209
209
|
field_subfield << combined[3,1]
|
210
210
|
end
|
211
211
|
|
212
|
-
|
212
|
+
def full_edit
|
213
|
+
#puts self.class
|
214
|
+
orig_marc = Tempfile.new("orig_marc-")
|
215
|
+
orig_marc << self.marc.to_marc
|
216
|
+
orig_marc.close
|
217
|
+
|
218
|
+
line_format = `yaz-marcdump #{orig_marc.path}`
|
219
|
+
|
220
|
+
out = Tempfile.new("full_edit-")
|
221
|
+
out << line_format
|
222
|
+
out.close
|
223
|
+
|
224
|
+
system("#{TEXT_EDITOR} #{out.path}")
|
225
|
+
|
226
|
+
final = Tempfile.new("final-")
|
227
|
+
final.close
|
228
|
+
`yaz-marcdump -i line -o marc #{out.path} > #{final.path}`
|
229
|
+
|
230
|
+
record = MARC::Reader.new(final.path)
|
231
|
+
for rec in record
|
232
|
+
puts rec
|
233
|
+
self.marc = rec
|
234
|
+
puts rec.class
|
235
|
+
end
|
236
|
+
puts self.marc.inspect
|
237
|
+
|
238
|
+
end
|
239
|
+
|
213
240
|
|
214
241
|
# To use marc_to_csv it must be passed a csv template in the order of the fields.
|
215
242
|
# See the zoomer.yaml file for instructions on creating a template.
|
@@ -242,7 +269,15 @@ module ZCC
|
|
242
269
|
end
|
243
270
|
end
|
244
271
|
value.sub!(/\|$/, '')
|
245
|
-
|
272
|
+
if leng
|
273
|
+
if value.length == value.jlength
|
274
|
+
value = value[0, leng]
|
275
|
+
else
|
276
|
+
puts "This value seems to have multibyte characters. If a byte gets dropped off the end that spells trouble."
|
277
|
+
leng = ask("How many bytes would you like to take?")
|
278
|
+
value = value[0, leng.to_s]
|
279
|
+
end
|
280
|
+
end
|
246
281
|
#puts "value: #{value}"
|
247
282
|
value = "\"#{value}\","
|
248
283
|
values << value
|
data/lib/zcc/resultset.rb
CHANGED
data/lib/zcc/version.rb
CHANGED
data/website/index.html
CHANGED
@@ -33,23 +33,25 @@
|
|
33
33
|
<h1>zcc projects</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/zcc"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/zcc" class="numbers">0.
|
36
|
+
<a href="http://rubyforge.org/projects/zcc" class="numbers">0.2.0</a>
|
37
37
|
</div>
|
38
38
|
<h1>→ ‘zcc’</h1>
|
39
39
|
|
40
|
+
|
40
41
|
<h2>What</h2>
|
41
42
|
|
43
|
+
|
42
44
|
<p><strong>Zcc projects</strong> is a collection of tools written in Ruby to help with copy cataloging.</p>
|
43
45
|
|
44
46
|
|
45
|
-
<h1><strong>THIS IS <em>alpha</em> SOFTWARE. <span class="caps">IT MIGHT MANGLE YOUR MARC AND CORRUPT YOUR CATALOG</span>.</strong
|
47
|
+
<h1><strong><span class="caps">THIS IS</span> <em>alpha</em> SOFTWARE. <span class="caps">IT MIGHT MANGLE YOUR MARC AND CORRUPT YOUR CATALOG</span>.</strong>
|
48
|
+
I use it myself, but I care enough about your data to call it alpha for now.</h1>
|
46
49
|
|
47
|
-
<h1>zcc project releases so far</h1>
|
48
50
|
|
49
|
-
<
|
51
|
+
<h1>zcc project releases so far</h1>
|
50
52
|
|
51
53
|
|
52
|
-
<p><a href="http://zcc.rubyforge.org/
|
54
|
+
<p><a href="http://zcc.rubyforge.org/zcc.html">zcc</a> zcc is the main copy cataloging script.</p>
|
53
55
|
|
54
56
|
</div>
|
55
57
|
|
data/website/index.txt
CHANGED
@@ -7,12 +7,12 @@ h2. What
|
|
7
7
|
*Zcc projects* is a collection of tools written in Ruby to help with copy cataloging.
|
8
8
|
|
9
9
|
|
10
|
-
h1. *THIS IS _alpha_ SOFTWARE. IT MIGHT MANGLE YOUR MARC AND CORRUPT YOUR CATALOG.*
|
10
|
+
h1. *THIS IS _alpha_ SOFTWARE. IT MIGHT MANGLE YOUR MARC AND CORRUPT YOUR CATALOG.*
|
11
|
+
I use it myself, but I care enough about your data to call it alpha for now.
|
11
12
|
|
12
13
|
h1. zcc project releases so far
|
13
14
|
|
14
15
|
"zcc":http://zcc.rubyforge.org/zcc.html zcc is the main copy cataloging script.
|
15
16
|
|
16
|
-
"wcid":http://zcc.rubyforge.org/wcid wcid is a library for handling WorldCat Identites
|
17
17
|
|
18
18
|
|
data/website/koha.html
CHANGED
@@ -33,53 +33,66 @@
|
|
33
33
|
<h1>Using Koha with zcc</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/zcc"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/zcc" class="numbers">0.
|
36
|
+
<a href="http://rubyforge.org/projects/zcc" class="numbers">0.2.0</a>
|
37
37
|
</div>
|
38
38
|
<p><a href="http://www.koha.org">Koha</a> + <a href="http://zcc.rubyforge.org/zcc.html">zcc</a></p>
|
39
39
|
|
40
40
|
|
41
41
|
<h2>Hints</h2>
|
42
42
|
|
43
|
-
|
43
|
+
|
44
|
+
<ol>
|
44
45
|
<li>Follow all the directions on the <a href="http://zcc.rubyforge.org/zcc.html">main zcc page</a> carefully. Please let me know if you run into problems with configuration.</li>
|
45
|
-
</ol>
|
46
|
+
</ol>
|
47
|
+
|
46
48
|
|
47
|
-
<ol>
|
49
|
+
<ol>
|
48
50
|
<li><a href="http://zcc.rubyforge.org/zcc.html">zcc</a> is <strong>not</strong> a part of Koha and is not developed by the same folks.</li>
|
49
|
-
</ol>
|
51
|
+
</ol>
|
52
|
+
|
50
53
|
|
51
|
-
<ol>
|
54
|
+
<ol>
|
52
55
|
<li><a href="http://zcc.rubyforge.org/zcc.html">zcc</a> only creates utf-8 encoded records. If you want <span class="caps">MARC</span>-8 encoded records you’re on your own. <span class="caps">MARC</span>-8 encoding has already caused enough problems in this world, so I encourage folks to move to <span class="caps">UTF</span>-8 <span class="caps">ASAP</span>. If you use a different encoding that you want supported, please let me know. To set up Koha properly for dealing with <span class="caps">UTF</span>-8 encoded records see <a href="http://wiki.koha.org/doku.php?id=encodingscratchpad&s=utf8">this wiki page</a></li>
|
53
|
-
</ol>
|
56
|
+
</ol>
|
57
|
+
|
58
|
+
|
59
|
+
<ol>
|
60
|
+
<li><span class="caps">ZCC</span> currently only works with a default install of Koha as paths are hardcoded. If there’s a need I’ll make it configurable for someone. Make sure the Koha modules are a part of your path. I accomplish this by adding “export <span class="caps">PERL5LIB</span>=/usr/local/koha/intranet/modules” (and “export <span class="caps">KOHA</span>_CONF=/etc/koha.conf”?) without the quotes to my .bashrc (or add the path to /etc/profile for the root user). If your paths differ from the preceding saving to Koha will not work.</li>
|
61
|
+
</ol>
|
62
|
+
|
54
63
|
|
55
|
-
<ol>
|
56
|
-
<li
|
57
|
-
</ol>
|
64
|
+
<ol>
|
65
|
+
<li>You then have 3 choices on how to get the records into koha:
|
58
66
|
|
59
|
-
<
|
60
|
-
<li>
|
61
|
-
|
62
|
-
</ul>
|
67
|
+
<ul>
|
68
|
+
<li>Use <span class="caps">ZCC</span> to save_record_syntax your <span class="caps">MARC</span> records to file as ‘marc’. Using the Koha Administration interface you can “Upload <span class="caps">MARC</span> records to the resevoir.” Then complete processing on the records like adding items and barcodes within the Koha web interface. The resevoir may strip out some fields that usually hold local content.</li>
|
69
|
+
</ul>
|
63
70
|
|
64
|
-
|
71
|
+
|
72
|
+
<ul>
|
65
73
|
<li>If you have processed your records fully to include item numbers and barcodes, you can use the bulkmarcimport script to put the records directly into your database. I’ve used bulkmarcimport without modification without problem. You may have different results and I’d like to hear them.</li>
|
66
|
-
</ul>
|
74
|
+
</ul>
|
75
|
+
|
67
76
|
|
68
77
|
<pre syntax="ruby">perl
|
69
78
|
/usr/local/koha/intranet/scripts/misc/migration_tools/bulkmarcimport.pl -v -file
|
70
79
|
/path/to/marc-file.mrc</pre>
|
80
|
+
|
71
81
|
<p>That is all one line.</p>
|
72
82
|
|
73
83
|
|
74
|
-
<ul>
|
84
|
+
<ul>
|
75
85
|
<li>Or configure the save_record_syntax of your zcc.yaml file to ‘koha2’. If this gives you errors make sure you have exported environment variables with: “export -p”. You may also need to change the permissions on /etc/koha.conf to allow all users to view the file. If you get errors you can (though it might not be the best solution) do the following as root:</li>
|
76
|
-
</ul>
|
86
|
+
</ul>
|
87
|
+
|
77
88
|
|
78
89
|
<pre>chmod 644 /etc/koha.conf</pre></li>
|
79
|
-
</ol>
|
90
|
+
</ol>
|
91
|
+
|
80
92
|
|
81
93
|
<h1>Contact</h1>
|
82
94
|
|
95
|
+
|
83
96
|
<p>I use <span class="caps">ZCC</span> and Koha for my own work. So I’m very interested in making <span class="caps">ZCC</span> work better with Koha. Please send your comments, suggestions and patches to <a href="mailto:jronallo+zcc@gmail.com">Jason Ronallo</a></p>
|
84
97
|
|
85
98
|
</div>
|