berkeley_library-tind 0.4.3 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +16 -4
  3. data/.gitignore +3 -0
  4. data/.idea/inspectionProfiles/Project_Default.xml +10 -0
  5. data/.idea/tind.iml +24 -22
  6. data/CHANGES.md +24 -0
  7. data/README.md +136 -3
  8. data/berkeley_library-tind.gemspec +2 -0
  9. data/bin/alma-multiple-tind +50 -0
  10. data/bin/alma-single-tind +48 -0
  11. data/bin/save_tind_records +80 -0
  12. data/bin/tind-marc +73 -0
  13. data/lib/berkeley_library/tind/mapping/additional_datafield_process.rb +128 -0
  14. data/lib/berkeley_library/tind/mapping/alma.rb +42 -0
  15. data/lib/berkeley_library/tind/mapping/alma_base.rb +101 -0
  16. data/lib/berkeley_library/tind/mapping/alma_multiple_tind.rb +31 -0
  17. data/lib/berkeley_library/tind/mapping/alma_single_tind.rb +28 -0
  18. data/lib/berkeley_library/tind/mapping/config.rb +44 -0
  19. data/lib/berkeley_library/tind/mapping/csv_mapper.rb +35 -0
  20. data/lib/berkeley_library/tind/mapping/csv_multiple_mapper.rb +41 -0
  21. data/lib/berkeley_library/tind/mapping/data/one_to_multiple_mapping.csv +4 -0
  22. data/lib/berkeley_library/tind/mapping/data/one_to_one_mapping.csv +39 -0
  23. data/lib/berkeley_library/tind/mapping/external_tind_field.rb +103 -0
  24. data/lib/berkeley_library/tind/mapping/field_catalog.rb +146 -0
  25. data/lib/berkeley_library/tind/mapping/field_catalog_util.rb +59 -0
  26. data/lib/berkeley_library/tind/mapping/match_tind_field.rb +77 -0
  27. data/lib/berkeley_library/tind/mapping/misc.rb +69 -0
  28. data/lib/berkeley_library/tind/mapping/multiple_rule.rb +36 -0
  29. data/lib/berkeley_library/tind/mapping/single_rule.rb +143 -0
  30. data/lib/berkeley_library/tind/mapping/tind_control_subfield.rb +59 -0
  31. data/lib/berkeley_library/tind/mapping/tind_field.rb +49 -0
  32. data/lib/berkeley_library/tind/mapping/tind_field_from_leader.rb +27 -0
  33. data/lib/berkeley_library/tind/mapping/tind_field_from_multiple_map.rb +59 -0
  34. data/lib/berkeley_library/tind/mapping/tind_field_from_single_map.rb +170 -0
  35. data/lib/berkeley_library/tind/mapping/tind_field_util.rb +112 -0
  36. data/lib/berkeley_library/tind/mapping/tind_marc.rb +134 -0
  37. data/lib/berkeley_library/tind/mapping/tind_subfield_util.rb +154 -0
  38. data/lib/berkeley_library/tind/mapping/util.rb +117 -0
  39. data/lib/berkeley_library/tind/mapping.rb +1 -0
  40. data/lib/berkeley_library/tind/marc/xml_builder.rb +70 -0
  41. data/lib/berkeley_library/tind/marc/xml_reader.rb +22 -16
  42. data/lib/berkeley_library/tind/marc/xml_writer.rb +152 -0
  43. data/lib/berkeley_library/tind/module_info.rb +1 -1
  44. data/lib/berkeley_library/util/files.rb +38 -0
  45. data/spec/berkeley_library/tind/mapping/additional_datafield_process_spec.rb +35 -0
  46. data/spec/berkeley_library/tind/mapping/alma_base_spec.rb +115 -0
  47. data/spec/berkeley_library/tind/mapping/alma_multiple_tind_spec.rb +20 -0
  48. data/spec/berkeley_library/tind/mapping/alma_single_tind_spec.rb +87 -0
  49. data/spec/berkeley_library/tind/mapping/alma_spec.rb +28 -0
  50. data/spec/berkeley_library/tind/mapping/config_spec.rb +19 -0
  51. data/spec/berkeley_library/tind/mapping/csv_mapper_spec.rb +27 -0
  52. data/spec/berkeley_library/tind/mapping/csv_multiple_mapper_spec.rb +27 -0
  53. data/spec/berkeley_library/tind/mapping/external_tind_field_spec.rb +45 -0
  54. data/spec/berkeley_library/tind/mapping/field_catalog_spec.rb +78 -0
  55. data/spec/berkeley_library/tind/mapping/field_catalog_util_spec.rb +57 -0
  56. data/spec/berkeley_library/tind/mapping/match_tind_field_spec.rb +25 -0
  57. data/spec/berkeley_library/tind/mapping/misc_spec.rb +51 -0
  58. data/spec/berkeley_library/tind/mapping/multiple_rule_spec.rb +44 -0
  59. data/spec/berkeley_library/tind/mapping/single_rule_spec.rb +52 -0
  60. data/spec/berkeley_library/tind/mapping/tind_control_subfield_spec.rb +96 -0
  61. data/spec/berkeley_library/tind/mapping/tind_field_from_leader_spec.rb +21 -0
  62. data/spec/berkeley_library/tind/mapping/tind_field_from_multiple_map_spec.rb +31 -0
  63. data/spec/berkeley_library/tind/mapping/tind_field_from_single_map_spec.rb +150 -0
  64. data/spec/berkeley_library/tind/mapping/tind_field_spec.rb +60 -0
  65. data/spec/berkeley_library/tind/mapping/tind_field_util_spec.rb +68 -0
  66. data/spec/berkeley_library/tind/mapping/tind_marc_spec.rb +88 -0
  67. data/spec/berkeley_library/tind/mapping/tind_subfield_util_spec.rb +48 -0
  68. data/spec/berkeley_library/tind/mapping/util_spec.rb +56 -0
  69. data/spec/berkeley_library/tind/marc/xml_reader_spec.rb +22 -0
  70. data/spec/berkeley_library/tind/marc/xml_writer_spec.rb +218 -0
  71. data/spec/data/issue-4.xml +157 -0
  72. data/spec/data/mapping/991032333019706532-sru.xml +216 -0
  73. data/spec/data/mapping/one_to_multiple_mapping.csv +4 -0
  74. data/spec/data/mapping/one_to_one_mapping.csv +39 -0
  75. data/spec/data/mapping/record.xml +263 -0
  76. data/spec/data/mapping/record_not_qualified.xml +36 -0
  77. data/spec/data/new-records.xml +46 -0
  78. metadata +128 -2
@@ -0,0 +1,263 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><searchRetrieveResponse xmlns="http://www.loc.gov/zing/srw/">
2
+ <version>1.2</version>
3
+ <numberOfRecords>1</numberOfRecords>
4
+ <records>
5
+ <record>
6
+ <recordSchema>marcxml</recordSchema>
7
+ <recordPacking>xml</recordPacking>
8
+ <recordData>
9
+ <record xmlns="http://www.loc.gov/MARC21/slim">
10
+ <leader>02022nam a22004337a 4500</leader>
11
+ <controlfield tag="001">991046494559706532</controlfield>
12
+ <controlfield tag="005">20060905 TAPE EALR0905: 0018</controlfield>
13
+ <controlfield tag="008">000215s1785 cc 000 0 chi d</controlfield>
14
+ <datafield ind1=" " ind2=" " tag="035">
15
+ <subfield code="a">(CUY)UCB-b113122639-01ucs_ber</subfield>
16
+ </datafield>
17
+ <datafield ind1=" " ind2=" " tag="035">
18
+ <subfield code="a">(OCoLC)43454304</subfield>
19
+ <subfield code="9">ExL</subfield>
20
+ </datafield>
21
+ <datafield ind1=" " ind2=" " tag="035">
22
+ <subfield code="a">CUBO04-B353</subfield>
23
+ </datafield>
24
+ <datafield ind1=" " ind2=" " tag="035">
25
+ <subfield code="a">(EXLNZ-01UCS_NETWORK)9913472398106531</subfield>
26
+ </datafield>
27
+ <datafield ind1=" " ind2=" " tag="040">
28
+ <subfield code="a">CU</subfield>
29
+ <subfield code="c">CU</subfield>
30
+ <subfield code="d">CStRLIN</subfield>
31
+ <subfield code="d">CaBVaU</subfield>
32
+ </datafield>
33
+ <datafield ind1=" " ind2=" " tag="066">
34
+ <subfield code="c">$1</subfield>
35
+ </datafield>
36
+ <datafield ind1=" " ind2=" " tag="090">
37
+ <subfield code="b">5090.1962</subfield>
38
+ <subfield code="9">LOCAL</subfield>
39
+ </datafield>
40
+ <datafield ind1=" " ind2=" " tag="090">
41
+ <subfield code="a">PL1281</subfield>
42
+ <subfield code="b">.S85 1785</subfield>
43
+ <subfield code="9">LOCAL</subfield>
44
+ </datafield>
45
+ <!-- <datafield ind1="0" ind2="0" tag="245">
46
+ <subfield code="6">880-01</subfield>
47
+ <subfield code="a">Cang jie pian :</subfield>
48
+ <subfield code="b">[san juan] /</subfield>
49
+ <subfield code="c">Sun Xingyan xue.</subfield>
50
+ </datafield> -->
51
+ <datafield ind1=" " ind2=" " tag="255">
52
+ <subfield code="a">fake_255_a</subfield>
53
+ </datafield>
54
+
55
+ <datafield ind1=" " ind2=" " tag="507">
56
+ <subfield code="6">880_09</subfield>
57
+ <subfield code="a">fake_507_a</subfield>
58
+ </datafield>
59
+ <datafield ind1="0" ind2="0" tag="245">
60
+ <subfield code="6">880-99</subfield>
61
+ <subfield code="a">Cang jie pian :</subfield>
62
+ <subfield code="b">[san juan] /</subfield>
63
+ <subfield code="c">Sun Xingyan xue.</subfield>
64
+ </datafield>
65
+
66
+ <datafield ind1="0" ind2="0" tag="880">
67
+ <subfield code="6">507-09/$1</subfield>
68
+ <subfield code="a">倉頡篇 :</subfield>
69
+ </datafield>
70
+
71
+ <datafield ind1="0" ind2="0" tag="880">
72
+ <subfield code="6">245-01/$1</subfield>
73
+ <subfield code="a">倉頡篇 :</subfield>
74
+ <subfield code="b">[三卷] /</subfield>
75
+ <subfield code="c">孫星衍學.</subfield>
76
+ </datafield>
77
+ <datafield ind1="3" ind2=" " tag="246">
78
+ <subfield code="6">880-02</subfield>
79
+ <subfield code="a">Sun shi Cang jie pian</subfield>
80
+ <subfield code="b">^^ b fake</subfield>
81
+ <subfield code="n">^^ n fake</subfield>
82
+ <subfield code="p">^^ p fake</subfield>
83
+ </datafield>
84
+ <datafield ind1="3" ind2=" " tag="880">
85
+ <subfield code="6">246-02/$1</subfield>
86
+ <subfield code="a">孫氏倉頡篇</subfield>
87
+ </datafield>
88
+ <datafield ind1=" " ind2=" " tag="260">
89
+ <subfield code="6">880-03</subfield>
90
+ <subfield code="a">[Daliang] :</subfield>
91
+ <subfield code="b">Daliang fu shu,</subfield>
92
+ <subfield code="c">Qing Qianlong 50 nian [1785]</subfield>
93
+ </datafield>
94
+ <datafield ind1=" " ind2=" " tag="880">
95
+ <subfield code="6">260-03/$1</subfield>
96
+ <subfield code="a">[大梁] :</subfield>
97
+ <subfield code="b">大梁撫署,</subfield>
98
+ <subfield code="c">清乾隆50年 [1785]</subfield>
99
+ </datafield>
100
+ <datafield ind1=" " ind2=" " tag="300">
101
+ <subfield code="a">1 v. ;</subfield>
102
+ <subfield code="c">27 cm.</subfield>
103
+ </datafield>
104
+ <datafield ind1=" " ind2=" " tag="300">
105
+ <subfield code="3">fake 3</subfield>
106
+ <subfield code="a">2 v. ;</subfield>
107
+ <subfield code="b">fake cm.</subfield>
108
+ </datafield>
109
+ <datafield ind1="0" ind2=" " tag="490">
110
+ <subfield code="6">880-04</subfield>
111
+ <subfield code="a">[Dai nan ge cong shu]</subfield>
112
+ </datafield>
113
+ <datafield ind1="0" ind2=" " tag="880">
114
+ <subfield code="6">490-04/$1</subfield>
115
+ <subfield code="a">[岱南閣叢書]</subfield>
116
+ </datafield>
117
+
118
+ <datafield ind1=" " ind2="0" tag="630">
119
+ <subfield code="6">880-16</subfield>
120
+ <subfield code="a">fake a * </subfield>
121
+ <subfield code="b">fake b *</subfield>
122
+ <subfield code="c">fake c *</subfield>
123
+ <subfield code="d">fake d *</subfield>
124
+ <subfield code="f">fake f *</subfield>
125
+ <subfield code="j">fake j *</subfield>
126
+ <subfield code="k">fake k *</subfield>
127
+ <subfield code="l">fake l *</subfield>
128
+ <subfield code="m">fake m *</subfield>
129
+ <subfield code="n">fake n *</subfield>
130
+ <subfield code="o">fake o *</subfield>
131
+ <subfield code="p">fake p *</subfield>
132
+ <subfield code="q">fake q *</subfield>
133
+ <subfield code="r">fake r *</subfield>
134
+ <subfield code="s">fake s *</subfield>
135
+ <subfield code="t">fake t *</subfield>
136
+
137
+ <subfield code="x">fake x1 </subfield>
138
+ <subfield code="x">fake x2 </subfield>
139
+ <subfield code="2">sk</subfield>
140
+ </datafield>
141
+
142
+ <datafield ind1="1" ind2=" " tag="880">
143
+ <subfield code="a">a fake 880 field without subfield6 for test</subfield>
144
+ </datafield>
145
+ <datafield ind1=" " ind2="0" tag="650">
146
+ <subfield code="a">Chinese language</subfield>
147
+ <subfield code="v">Glossaries, vocabularies, etc.</subfield>
148
+ </datafield>
149
+ <datafield ind1=" " ind2="7" tag="650">
150
+ <subfield code="6">880-05</subfield>
151
+ <subfield code="a">Jing bu</subfield>
152
+ <subfield code="x">Xiao xue lei</subfield>
153
+ <subfield code="x">Zi shu.</subfield>
154
+ <subfield code="2">fast</subfield>
155
+ </datafield>
156
+ <datafield ind1=" " ind2="7" tag="880">
157
+ <subfield code="6">650-05/$1</subfield>
158
+ <subfield code="a">經部</subfield>
159
+ <subfield code="x">小學類</subfield>
160
+ <subfield code="x">字書.</subfield>
161
+ <subfield code="2">sk</subfield>
162
+ </datafield>
163
+ <datafield ind1="1" ind2=" " tag="700">
164
+ <subfield code="6">880-06</subfield>
165
+ <subfield code="e">xue.</subfield>
166
+ <subfield code="a">Sun, Xingyan,</subfield>
167
+ <subfield code="d">1753-1818,</subfield>
168
+
169
+ </datafield>
170
+ <datafield ind1="1" ind2=" " tag="880">
171
+ <subfield code="6">700-06/$1</subfield>
172
+ <subfield code="e">學.</subfield>
173
+ <subfield code="a">孫星衍,</subfield>
174
+ <subfield code="d">1753-1818,</subfield>
175
+
176
+ </datafield>
177
+ <datafield ind1="9" ind2=" " tag="710">
178
+ <subfield code="6">880-07</subfield>
179
+ <subfield code="a">Daliang fu shu,</subfield>
180
+ <subfield code="e">ke.</subfield>
181
+ </datafield>
182
+ <datafield ind1="2" ind2=" " tag="880">
183
+ <subfield code="6">710-07/$1</subfield>
184
+ <subfield code="a">大梁撫署,</subfield>
185
+ <subfield code="e">刻.</subfield>
186
+ </datafield>
187
+ <datafield ind1=" " ind2=" " tag="880">
188
+ <subfield code="6">500-00/$1</subfield>
189
+ <subfield code="a">卷分上中下.</subfield>
190
+ </datafield>
191
+ <datafield ind1=" " ind2=" " tag="880">
192
+ <subfield code="6">500-00/$1</subfield>
193
+ <subfield code="a">與BCUO02-B3324同版, 該書有封面鐫"李斯等倉頡篇亁隆乙巳冬十月刋于大梁撫署絳華山人作".</subfield>
194
+ </datafield>
195
+ <datafield ind1=" " ind2=" " tag="880">
196
+ <subfield code="6">500-00/$1</subfield>
197
+ <subfield code="a">亁隆五十年畢沅"序"言刻書事.</subfield>
198
+ </datafield>
199
+ <datafield ind1=" " ind2=" " tag="880">
200
+ <subfield code="6">500-00/$1</subfield>
201
+ <subfield code="a">框19.3 x 14.8公分, 11行22字, 黑口, 四周單邊, 雙黑魚尾. 版心中鐫書名及卷次.</subfield>
202
+ </datafield>
203
+ <datafield ind1="4" ind2=" " tag="880">
204
+ <subfield code="6">510-00/$1</subfield>
205
+ <subfield code="a">叢書名據《中國叢書綜錄》,</subfield>
206
+ <subfield code="c">1:147, 《柏克萊加州大學東亞圖書館中文古籍善本書志》, no.59, p.30.</subfield>
207
+ </datafield>
208
+ <datafield ind1=" " ind2=" " tag="968">
209
+ <subfield code="a">Reclvl: f Addate: 000215 Addid: OCL Moddate: 080606 Modid: XRF</subfield>
210
+ <subfield code="9">LOCAL</subfield>
211
+ </datafield>
212
+ <datafield ind1=" " ind2=" " tag="990">
213
+ <subfield code="a">EAST;</subfield>
214
+ <subfield code="b">5090.1962;</subfield>
215
+ <subfield code="c">SLF: RETROCON</subfield>
216
+ <subfield code="9">LOCAL</subfield>
217
+ </datafield>
218
+ <datafield ind1=" " ind2=" " tag="996">
219
+ <subfield code="e">GLADN184850109</subfield>
220
+ <subfield code="9">LOCAL</subfield>
221
+ </datafield>
222
+ <datafield ind1=" " ind2=" " tag="996">
223
+ <subfield code="a">b113122639</subfield>
224
+ <subfield code="b">Updated: 01-20-13</subfield>
225
+ <subfield code="c">Created: 03-17-09</subfield>
226
+ <subfield code="d">CatDate: 02-15-00</subfield>
227
+ <subfield code="9">LOCAL</subfield>
228
+ </datafield>
229
+ <datafield ind1=" " ind2=" " tag="264">
230
+ <subfield code="a">264 fake a 1</subfield>
231
+ <subfield code="b">264 fake b 1</subfield>
232
+ <subfield code="c">264 fake c 1</subfield>
233
+ </datafield>
234
+ <datafield ind1=" " ind2=" " tag="264">
235
+ <subfield code="a">264 fake 2</subfield>
236
+ </datafield>
237
+ <datafield ind1=" " ind2=" " tag="AVA">
238
+ <subfield code="0">991046494559706532</subfield>
239
+ <subfield code="8">22702269110006532</subfield>
240
+ <subfield code="a">01UCS_BER</subfield>
241
+ <subfield code="b">EAL</subfield>
242
+ <subfield code="c">East Asian Rare</subfield>
243
+ <subfield code="d">5090.1962</subfield>
244
+ <subfield code="e">available</subfield>
245
+ <subfield code="f">1</subfield>
246
+ <subfield code="g">0</subfield>
247
+ <subfield code="i">UCB_Campus</subfield>
248
+ <subfield code="j">eau</subfield>
249
+ <subfield code="k">8</subfield>
250
+ <subfield code="p">1</subfield>
251
+ <subfield code="q">East Asian Library</subfield>
252
+ </datafield>
253
+ </record>
254
+ </recordData>
255
+ <recordIdentifier>991046494559706532</recordIdentifier>
256
+ <recordPosition>1</recordPosition>
257
+ </record>
258
+ </records>
259
+ <extraResponseData xmlns:xb="http://www.exlibris.com/repository/search/xmlbeans/">
260
+ <xb:exact>true</xb:exact>
261
+ <xb:responseDate>2022-01-27T19:08:03-0800</xb:responseDate>
262
+ </extraResponseData>
263
+ </searchRetrieveResponse>
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><searchRetrieveResponse xmlns="http://www.loc.gov/zing/srw/">
2
+ <version>1.2</version>
3
+ <numberOfRecords>1</numberOfRecords>
4
+ <records>
5
+ <record>
6
+ <recordSchema>marcxml</recordSchema>
7
+ <recordPacking>xml</recordPacking>
8
+ <recordData>
9
+ <record xmlns="http://www.loc.gov/MARC21/slim">
10
+ <leader>02022nam a22004337a 4500</leader>
11
+ <controlfield tag="001">991046494559706532</controlfield>
12
+ <controlfield tag="005">20060905 TAPE EALR0905: 0018</controlfield>
13
+ <controlfield tag="008">000215s1785 cc 000 0 chi d</controlfield>
14
+ <datafield ind1=" " ind2=" " tag="035">
15
+ <subfield code="a">(CUY)UCB-b113122639-01ucs_ber</subfield>
16
+ </datafield>
17
+
18
+ <datafield ind1="0" ind2="0" tag="245">
19
+ <subfield code="6">880-99</subfield>
20
+ <subfield code="a">Host bibliographic record for boundwith item barcode C094698419</subfield>
21
+ <subfield code="b">[san juan] /</subfield>
22
+ <subfield code="c">Sun Xingyan xue.</subfield>
23
+ </datafield>
24
+
25
+
26
+ </record>
27
+ </recordData>
28
+ <recordIdentifier>991046494559706532</recordIdentifier>
29
+ <recordPosition>1</recordPosition>
30
+ </record>
31
+ </records>
32
+ <extraResponseData xmlns:xb="http://www.exlibris.com/repository/search/xmlbeans/">
33
+ <xb:exact>true</xb:exact>
34
+ <xb:responseDate>2022-01-27T19:08:03-0800</xb:responseDate>
35
+ </extraResponseData>
36
+ </searchRetrieveResponse>
@@ -0,0 +1,46 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Source: "Batch Uploader: Caveats, common errors and example metadata files", docs.tind.io
4
+ -->
5
+ <collection xmlns="http://www.loc.gov/MARC21/slim">
6
+ <record>
7
+
8
+ <!-- The Leader is encoded in the `000` control field.
9
+ If you want to edit the leader in software such as
10
+ MarcEdit, you will need to change these fields to a
11
+ leader tag. Then, before import into the repository
12
+ you will need to change the fields back to controlfields
13
+ with tag `000`.
14
+ -->
15
+ <controlfield tag="000">00287cam\a2200313\\\4500</controlfield>
16
+
17
+ <!-- All whitespace in control fields need to be replaced with
18
+ backspaces.
19
+ -->
20
+ <controlfield tag="008">190409s2015\\\\xx\\\\\\\\\\\\\\\\\\eng\\</controlfield>
21
+
22
+ <!-- Regular fields are encoded in datafield elements. -->
23
+ <datafield tag="100" ind1="0" ind2=" ">
24
+ <subfield code="a">Aristotle</subfield>
25
+ <subfield code="0">580897</subfield>
26
+ </datafield>
27
+
28
+ <datafield tag="245" ind1="0" ind2="0">
29
+ <subfield code="a">Metaphysics</subfield>
30
+ <subfield code="c">Aristotle</subfield>
31
+ </datafield>
32
+
33
+ <datafield tag="260" ind1=" " ind2=" ">
34
+ <subfield code="a">Narnia</subfield>
35
+ <subfield code="b">Fictive Books</subfield>
36
+ <subfield code="c">2015</subfield>
37
+ </datafield>
38
+
39
+ <!-- Make sure to include a collection when uploading new
40
+ records, so that the record will be searchable.
41
+ -->
42
+ <datafield tag="980" ind1=" " ind2=" ">
43
+ <subfield code="a">BIB</subfield>
44
+ </datafield>
45
+ </record>
46
+ </collection>
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: berkeley_library-tind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Moles
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-27 00:00:00.000000000 Z
11
+ date: 2022-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: berkeley_library-alma
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.0.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.0.1
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: berkeley_library-logging
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -198,6 +212,20 @@ dependencies:
198
212
  - - "~>"
199
213
  - !ruby/object:Gem::Version
200
214
  version: '2.7'
215
+ - !ruby/object:Gem::Dependency
216
+ name: equivalent-xml
217
+ requirement: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - "~>"
220
+ - !ruby/object:Gem::Version
221
+ version: '0.6'
222
+ type: :development
223
+ prerelease: false
224
+ version_requirements: !ruby/object:Gem::Requirement
225
+ requirements:
226
+ - - "~>"
227
+ - !ruby/object:Gem::Version
228
+ version: '0.6'
201
229
  - !ruby/object:Gem::Dependency
202
230
  name: rake
203
231
  requirement: !ruby/object:Gem::Requirement
@@ -364,7 +392,11 @@ files:
364
392
  - README.md
365
393
  - Rakefile
366
394
  - berkeley_library-tind.gemspec
395
+ - bin/alma-multiple-tind
396
+ - bin/alma-single-tind
397
+ - bin/save_tind_records
367
398
  - bin/tind-export
399
+ - bin/tind-marc
368
400
  - docker-compose.yml
369
401
  - lib/berkeley_library/tind.rb
370
402
  - lib/berkeley_library/tind/api.rb
@@ -394,9 +426,39 @@ files:
394
426
  - lib/berkeley_library/tind/export/row_metrics.rb
395
427
  - lib/berkeley_library/tind/export/table.rb
396
428
  - lib/berkeley_library/tind/export/table_metrics.rb
429
+ - lib/berkeley_library/tind/mapping.rb
430
+ - lib/berkeley_library/tind/mapping/additional_datafield_process.rb
431
+ - lib/berkeley_library/tind/mapping/alma.rb
432
+ - lib/berkeley_library/tind/mapping/alma_base.rb
433
+ - lib/berkeley_library/tind/mapping/alma_multiple_tind.rb
434
+ - lib/berkeley_library/tind/mapping/alma_single_tind.rb
435
+ - lib/berkeley_library/tind/mapping/config.rb
436
+ - lib/berkeley_library/tind/mapping/csv_mapper.rb
437
+ - lib/berkeley_library/tind/mapping/csv_multiple_mapper.rb
438
+ - lib/berkeley_library/tind/mapping/data/one_to_multiple_mapping.csv
439
+ - lib/berkeley_library/tind/mapping/data/one_to_one_mapping.csv
440
+ - lib/berkeley_library/tind/mapping/external_tind_field.rb
441
+ - lib/berkeley_library/tind/mapping/field_catalog.rb
442
+ - lib/berkeley_library/tind/mapping/field_catalog_util.rb
443
+ - lib/berkeley_library/tind/mapping/match_tind_field.rb
444
+ - lib/berkeley_library/tind/mapping/misc.rb
445
+ - lib/berkeley_library/tind/mapping/multiple_rule.rb
446
+ - lib/berkeley_library/tind/mapping/single_rule.rb
447
+ - lib/berkeley_library/tind/mapping/tind_control_subfield.rb
448
+ - lib/berkeley_library/tind/mapping/tind_field.rb
449
+ - lib/berkeley_library/tind/mapping/tind_field_from_leader.rb
450
+ - lib/berkeley_library/tind/mapping/tind_field_from_multiple_map.rb
451
+ - lib/berkeley_library/tind/mapping/tind_field_from_single_map.rb
452
+ - lib/berkeley_library/tind/mapping/tind_field_util.rb
453
+ - lib/berkeley_library/tind/mapping/tind_marc.rb
454
+ - lib/berkeley_library/tind/mapping/tind_subfield_util.rb
455
+ - lib/berkeley_library/tind/mapping/util.rb
397
456
  - lib/berkeley_library/tind/marc.rb
457
+ - lib/berkeley_library/tind/marc/xml_builder.rb
398
458
  - lib/berkeley_library/tind/marc/xml_reader.rb
459
+ - lib/berkeley_library/tind/marc/xml_writer.rb
399
460
  - lib/berkeley_library/tind/module_info.rb
461
+ - lib/berkeley_library/util/files.rb
400
462
  - lib/berkeley_library/util/ods/spreadsheet.rb
401
463
  - lib/berkeley_library/util/ods/xml/content_doc.rb
402
464
  - lib/berkeley_library/util/ods/xml/document_node.rb
@@ -459,7 +521,32 @@ files:
459
521
  - spec/berkeley_library/tind/export/exporter_spec.rb
460
522
  - spec/berkeley_library/tind/export/row_spec.rb
461
523
  - spec/berkeley_library/tind/export/table_spec.rb
524
+ - spec/berkeley_library/tind/mapping/additional_datafield_process_spec.rb
525
+ - spec/berkeley_library/tind/mapping/alma_base_spec.rb
526
+ - spec/berkeley_library/tind/mapping/alma_multiple_tind_spec.rb
527
+ - spec/berkeley_library/tind/mapping/alma_single_tind_spec.rb
528
+ - spec/berkeley_library/tind/mapping/alma_spec.rb
529
+ - spec/berkeley_library/tind/mapping/config_spec.rb
530
+ - spec/berkeley_library/tind/mapping/csv_mapper_spec.rb
531
+ - spec/berkeley_library/tind/mapping/csv_multiple_mapper_spec.rb
532
+ - spec/berkeley_library/tind/mapping/external_tind_field_spec.rb
533
+ - spec/berkeley_library/tind/mapping/field_catalog_spec.rb
534
+ - spec/berkeley_library/tind/mapping/field_catalog_util_spec.rb
535
+ - spec/berkeley_library/tind/mapping/match_tind_field_spec.rb
536
+ - spec/berkeley_library/tind/mapping/misc_spec.rb
537
+ - spec/berkeley_library/tind/mapping/multiple_rule_spec.rb
538
+ - spec/berkeley_library/tind/mapping/single_rule_spec.rb
539
+ - spec/berkeley_library/tind/mapping/tind_control_subfield_spec.rb
540
+ - spec/berkeley_library/tind/mapping/tind_field_from_leader_spec.rb
541
+ - spec/berkeley_library/tind/mapping/tind_field_from_multiple_map_spec.rb
542
+ - spec/berkeley_library/tind/mapping/tind_field_from_single_map_spec.rb
543
+ - spec/berkeley_library/tind/mapping/tind_field_spec.rb
544
+ - spec/berkeley_library/tind/mapping/tind_field_util_spec.rb
545
+ - spec/berkeley_library/tind/mapping/tind_marc_spec.rb
546
+ - spec/berkeley_library/tind/mapping/tind_subfield_util_spec.rb
547
+ - spec/berkeley_library/tind/mapping/util_spec.rb
462
548
  - spec/berkeley_library/tind/marc/xml_reader_spec.rb
549
+ - spec/berkeley_library/tind/marc/xml_writer_spec.rb
463
550
  - spec/berkeley_library/util/ods/spreadsheet_spec.rb
464
551
  - spec/berkeley_library/util/ods/xml/content_doc_spec.rb
465
552
  - spec/berkeley_library/util/ods/xml/manifest/file_entry_spec.rb
@@ -472,6 +559,13 @@ files:
472
559
  - spec/data/collection-names.txt
473
560
  - spec/data/collections.json
474
561
  - spec/data/disjoint-records.xml
562
+ - spec/data/issue-4.xml
563
+ - spec/data/mapping/991032333019706532-sru.xml
564
+ - spec/data/mapping/one_to_multiple_mapping.csv
565
+ - spec/data/mapping/one_to_one_mapping.csv
566
+ - spec/data/mapping/record.xml
567
+ - spec/data/mapping/record_not_qualified.xml
568
+ - spec/data/new-records.xml
475
569
  - spec/data/record-184453.xml
476
570
  - spec/data/record-184458.xml
477
571
  - spec/data/record-187888.xml
@@ -530,7 +624,32 @@ test_files:
530
624
  - spec/berkeley_library/tind/export/exporter_spec.rb
531
625
  - spec/berkeley_library/tind/export/row_spec.rb
532
626
  - spec/berkeley_library/tind/export/table_spec.rb
627
+ - spec/berkeley_library/tind/mapping/additional_datafield_process_spec.rb
628
+ - spec/berkeley_library/tind/mapping/alma_base_spec.rb
629
+ - spec/berkeley_library/tind/mapping/alma_multiple_tind_spec.rb
630
+ - spec/berkeley_library/tind/mapping/alma_single_tind_spec.rb
631
+ - spec/berkeley_library/tind/mapping/alma_spec.rb
632
+ - spec/berkeley_library/tind/mapping/config_spec.rb
633
+ - spec/berkeley_library/tind/mapping/csv_mapper_spec.rb
634
+ - spec/berkeley_library/tind/mapping/csv_multiple_mapper_spec.rb
635
+ - spec/berkeley_library/tind/mapping/external_tind_field_spec.rb
636
+ - spec/berkeley_library/tind/mapping/field_catalog_spec.rb
637
+ - spec/berkeley_library/tind/mapping/field_catalog_util_spec.rb
638
+ - spec/berkeley_library/tind/mapping/match_tind_field_spec.rb
639
+ - spec/berkeley_library/tind/mapping/misc_spec.rb
640
+ - spec/berkeley_library/tind/mapping/multiple_rule_spec.rb
641
+ - spec/berkeley_library/tind/mapping/single_rule_spec.rb
642
+ - spec/berkeley_library/tind/mapping/tind_control_subfield_spec.rb
643
+ - spec/berkeley_library/tind/mapping/tind_field_from_leader_spec.rb
644
+ - spec/berkeley_library/tind/mapping/tind_field_from_multiple_map_spec.rb
645
+ - spec/berkeley_library/tind/mapping/tind_field_from_single_map_spec.rb
646
+ - spec/berkeley_library/tind/mapping/tind_field_spec.rb
647
+ - spec/berkeley_library/tind/mapping/tind_field_util_spec.rb
648
+ - spec/berkeley_library/tind/mapping/tind_marc_spec.rb
649
+ - spec/berkeley_library/tind/mapping/tind_subfield_util_spec.rb
650
+ - spec/berkeley_library/tind/mapping/util_spec.rb
533
651
  - spec/berkeley_library/tind/marc/xml_reader_spec.rb
652
+ - spec/berkeley_library/tind/marc/xml_writer_spec.rb
534
653
  - spec/berkeley_library/util/ods/spreadsheet_spec.rb
535
654
  - spec/berkeley_library/util/ods/xml/content_doc_spec.rb
536
655
  - spec/berkeley_library/util/ods/xml/manifest/file_entry_spec.rb
@@ -543,6 +662,13 @@ test_files:
543
662
  - spec/data/collection-names.txt
544
663
  - spec/data/collections.json
545
664
  - spec/data/disjoint-records.xml
665
+ - spec/data/issue-4.xml
666
+ - spec/data/mapping/991032333019706532-sru.xml
667
+ - spec/data/mapping/one_to_multiple_mapping.csv
668
+ - spec/data/mapping/one_to_one_mapping.csv
669
+ - spec/data/mapping/record.xml
670
+ - spec/data/mapping/record_not_qualified.xml
671
+ - spec/data/new-records.xml
546
672
  - spec/data/record-184453.xml
547
673
  - spec/data/record-184458.xml
548
674
  - spec/data/record-187888.xml