marc-vocab 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 003d5a0e685bf7cd5378171033c300ae8566d10f039852580ea2eacb705929fe
4
- data.tar.gz: f5ba119608ee5454a6a04bf33f87bb2ec24a8dd1407d61283ca5b47a66f4bd97
3
+ metadata.gz: 754d2548b42b26bee6d27bcaef49a8fe3c913bf7ba4d6cd6ddc29e2c61c9843f
4
+ data.tar.gz: 8d8c528de2d19754176d9b8a6e758c80ab7bdf228e72d46458e0df353ad76d71
5
5
  SHA512:
6
- metadata.gz: c3779eec408d352314dd2c36c8915eb5f056621bbb75c4db8dd70f750fcec06765146746125e43592fa6b69e8bfea621c0e33c98e93d70152b9bd3a9300a0144
7
- data.tar.gz: 528ef7f6376012229aac3debaf0edc5ba525b0601aafa8fac3347211be4b334097cc6c674d8460c56521685df5c1c35da2e3017bdf95d49a28fdbd859836a7ab
6
+ metadata.gz: 6d053baa401f70a4156c663dac9c020a06cb1cf7680e3bfcc1c43abf2501a0b2f440e21d35bb3ee1cfb8f867a393dd33dcad36071c6f17e0b3a107a80ffeba45
7
+ data.tar.gz: bb3bcc40dc4c066f646bf6842ce0b3449dfd11aa8460008caafd2c66e5c74b667a8be2d530e12c2a000625c5280efa0b65dfe912760a9e4f5cb23ee05b40f178
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- marc-vocab (0.1.1)
4
+ marc-vocab (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/marc/vocab.rb CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "vocab/version"
4
4
  require_relative "vocab/geographic_area"
5
+ require_relative "vocab/countries"
5
6
 
6
7
  module Marc
7
8
  module Vocab
@@ -0,0 +1,396 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Marc
4
+ module Vocab
5
+ # Map 3 letter MARC Country/Location Code to User Friendly Name
6
+ # includes discontinued codes, because they're probably in our data
7
+ # from https://www.loc.gov/marc/countries/countries_code.html 01/20/2016
8
+ module Countries
9
+ TERMS = {
10
+ "aa" => "Albania",
11
+ "abc" => "Alberta",
12
+ "ac" => "Ashmore and Cartier Islands",
13
+ "aca" => "Australian Capital Territory",
14
+ "ae" => "Algeria",
15
+ "af" => "Afghanistan",
16
+ "ag" => "Argentina",
17
+ "ai" => "Armenia (Republic)",
18
+ "air" => "Armenian S.S.R.",
19
+ "aj" => "Azerbaijan",
20
+ "ajr" => "Azerbaijan S.S.R.",
21
+ "aku" => "Alaska",
22
+ "alu" => "Alabama",
23
+ "am" => "Anguilla",
24
+ "an" => "Andorra",
25
+ "ao" => "Angola",
26
+ "aq" => "Antigua and Barbuda",
27
+ "aru" => "Arkansas",
28
+ "as" => "American Samoa",
29
+ "at" => "Australia",
30
+ "au" => "Austria",
31
+ "aw" => "Aruba",
32
+ "ay" => "Antarctica",
33
+ "azu" => "Arizona",
34
+ "ba" => "Bahrain",
35
+ "bb" => "Barbados",
36
+ "bcc" => "British Columbia",
37
+ "bd" => "Burundi",
38
+ "be" => "Belgium",
39
+ "bf" => "Bahamas",
40
+ "bg" => "Bangladesh",
41
+ "bh" => "Belize",
42
+ "bi" => "British Indian Ocean Territory",
43
+ "bl" => "Brazil",
44
+ "bm" => "Bermuda Islands",
45
+ "bn" => "Bosnia and Herzegovina",
46
+ "bo" => "Bolivia",
47
+ "bp" => "Solomon Islands",
48
+ "br" => "Burma",
49
+ "bs" => "Botswana",
50
+ "bt" => "Bhutan",
51
+ "bu" => "Bulgaria",
52
+ "bv" => "Bouvet Island",
53
+ "bw" => "Belarus",
54
+ "bwr" => "Byelorussian S.S.R.",
55
+ "bx" => "Brunei",
56
+ "ca" => "Caribbean Netherlands",
57
+ "cau" => "California",
58
+ "cb" => "Cambodia",
59
+ "cc" => "China",
60
+ "cd" => "Chad",
61
+ "ce" => "Sri Lanka",
62
+ "cf" => "Congo (Brazzaville)",
63
+ "cg" => "Congo (Democratic Republic)",
64
+ "ch" => "China (Republic : 1949 )",
65
+ "ci" => "Croatia",
66
+ "cj" => "Cayman Islands",
67
+ "ck" => "Colombia",
68
+ "cl" => "Chile",
69
+ "cm" => "Cameroon",
70
+ "cn" => "Canada",
71
+ "co" => "Curaçao",
72
+ "cou" => "Colorado",
73
+ "cp" => "Canton and Enderbury Islands",
74
+ "cq" => "Comoros",
75
+ "cr" => "Costa Rica",
76
+ "cs" => "Czechoslovakia",
77
+ "ctu" => "Connecticut",
78
+ "cu" => "Cuba",
79
+ "cv" => "Cabo Verde",
80
+ "cw" => "Cook Islands",
81
+ "cx" => "Central African Republic",
82
+ "cy" => "Cyprus",
83
+ "cz" => "Canal Zone",
84
+ "dcu" => "District of Columbia",
85
+ "deu" => "Delaware",
86
+ "dk" => "Denmark",
87
+ "dm" => "Benin",
88
+ "dq" => "Dominica",
89
+ "dr" => "Dominican Republic",
90
+ "ea" => "Eritrea",
91
+ "ec" => "Ecuador",
92
+ "eg" => "Equatorial Guinea",
93
+ "em" => "TimorLeste",
94
+ "enk" => "England",
95
+ "er" => "Estonia",
96
+ "err" => "Estonia",
97
+ "es" => "El Salvador",
98
+ "et" => "Ethiopia",
99
+ "fa" => "Faroe Islands",
100
+ "fg" => "French Guiana",
101
+ "fi" => "Finland",
102
+ "fj" => "Fiji",
103
+ "fk" => "Falkland Islands",
104
+ "flu" => "Florida",
105
+ "fm" => "Micronesia (Federated States)",
106
+ "fp" => "French Polynesia",
107
+ "fr" => "France",
108
+ "fs" => "Terres australes et antarctiques françaises",
109
+ "ft" => "Djibouti",
110
+ "gau" => "Georgia",
111
+ "gb" => "Kiribati",
112
+ "gd" => "Grenada",
113
+ "ge" => "Germany (East)",
114
+ "gh" => "Ghana",
115
+ "gi" => "Gibraltar",
116
+ "gl" => "Greenland",
117
+ "gm" => "Gambia",
118
+ "gn" => "Gilbert and Ellice Islands",
119
+ "go" => "Gabon",
120
+ "gp" => "Guadeloupe",
121
+ "gr" => "Greece",
122
+ "gs" => "Georgia (Republic)",
123
+ "gsr" => "Georgian S.S.R.",
124
+ "gt" => "Guatemala",
125
+ "gu" => "Guam",
126
+ "gv" => "Guinea",
127
+ "gw" => "Germany",
128
+ "gy" => "Guyana",
129
+ "gz" => "Gaza Strip",
130
+ "hiu" => "Hawaii",
131
+ "hk" => "Hong Kong",
132
+ "hm" => "Heard and McDonald Islands",
133
+ "ho" => "Honduras",
134
+ "ht" => "Haiti",
135
+ "hu" => "Hungary",
136
+ "iau" => "Iowa",
137
+ "ic" => "Iceland",
138
+ "idu" => "Idaho",
139
+ "ie" => "Ireland",
140
+ "ii" => "India",
141
+ "ilu" => "Illinois",
142
+ "inu" => "Indiana",
143
+ "io" => "Indonesia",
144
+ "iq" => "Iraq",
145
+ "ir" => "Iran",
146
+ "is" => "Israel",
147
+ "it" => "Italy",
148
+ "iu" => "IsraelSyria Demilitarized Zones",
149
+ "iv" => "Côte d'Ivoire",
150
+ "iw" => "IsraelJordan Demilitarized Zones",
151
+ "iy" => "IraqSaudi Arabia Neutral Zone",
152
+ "ja" => "Japan",
153
+ "ji" => "Johnston Atoll",
154
+ "jm" => "Jamaica",
155
+ "jn" => "Jan Mayen",
156
+ "jo" => "Jordan",
157
+ "ke" => "Kenya",
158
+ "kg" => "Kyrgyzstan",
159
+ "kgr" => "Kirghiz S.S.R.",
160
+ "kn" => "Korea (North)",
161
+ "ko" => "Korea (South)",
162
+ "ksu" => "Kansas",
163
+ "ku" => "Kuwait",
164
+ "kv" => "Kosovo",
165
+ "kyu" => "Kentucky",
166
+ "kz" => "Kazakhstan",
167
+ "kzr" => "Kazakh S.S.R.",
168
+ "lau" => "Louisiana",
169
+ "lb" => "Liberia",
170
+ "le" => "Lebanon",
171
+ "lh" => "Liechtenstein",
172
+ "li" => "Lithuania",
173
+ "lir" => "Lithuania",
174
+ "ln" => "Central and Southern Line Islands",
175
+ "lo" => "Lesotho",
176
+ "ls" => "Laos",
177
+ "lu" => "Luxembourg",
178
+ "lv" => "Latvia",
179
+ "lvr" => "Latvia",
180
+ "ly" => "Libya",
181
+ "mau" => "Massachusetts",
182
+ "mbc" => "Manitoba",
183
+ "mc" => "Monaco",
184
+ "mdu" => "Maryland",
185
+ "meu" => "Maine",
186
+ "mf" => "Mauritius",
187
+ "mg" => "Madagascar",
188
+ "mh" => "Macao",
189
+ "miu" => "Michigan",
190
+ "mj" => "Montserrat",
191
+ "mk" => "Oman",
192
+ "ml" => "Mali",
193
+ "mm" => "Malta",
194
+ "mnu" => "Minnesota",
195
+ "mo" => "Montenegro",
196
+ "mou" => "Missouri",
197
+ "mp" => "Mongolia",
198
+ "mq" => "Martinique",
199
+ "mr" => "Morocco",
200
+ "msu" => "Mississippi",
201
+ "mtu" => "Montana",
202
+ "mu" => "Mauritania",
203
+ "mv" => "Moldova",
204
+ "mvr" => "Moldavian S.S.R.",
205
+ "mw" => "Malawi",
206
+ "mx" => "Mexico",
207
+ "my" => "Malaysia",
208
+ "mz" => "Mozambique",
209
+ "na" => "Netherlands Antilles",
210
+ "nbu" => "Nebraska",
211
+ "ncu" => "North Carolina",
212
+ "ndu" => "North Dakota",
213
+ "ne" => "Netherlands",
214
+ "nfc" => "Newfoundland and Labrador",
215
+ "ng" => "Niger",
216
+ "nhu" => "New Hampshire",
217
+ "nik" => "Northern Ireland",
218
+ "nju" => "New Jersey",
219
+ "nkc" => "New Brunswick",
220
+ "nl" => "New Caledonia",
221
+ "nm" => "Northern Mariana Islands",
222
+ "nmu" => "New Mexico",
223
+ "nn" => "Vanuatu",
224
+ "no" => "Norway",
225
+ "np" => "Nepal",
226
+ "nq" => "Nicaragua",
227
+ "nr" => "Nigeria",
228
+ "nsc" => "Nova Scotia",
229
+ "ntc" => "Northwest Territories",
230
+ "nu" => "Nauru",
231
+ "nuc" => "Nunavut",
232
+ "nvu" => "Nevada",
233
+ "nw" => "Northern Mariana Islands",
234
+ "nx" => "Norfolk Island",
235
+ "nyu" => "New York (State)",
236
+ "nz" => "New Zealand",
237
+ "ohu" => "Ohio",
238
+ "oku" => "Oklahoma",
239
+ "onc" => "Ontario",
240
+ "oru" => "Oregon",
241
+ "ot" => "Mayotte",
242
+ "pau" => "Pennsylvania",
243
+ "pc" => "Pitcairn Island",
244
+ "pe" => "Peru",
245
+ "pf" => "Paracel Islands",
246
+ "pg" => "GuineaBissau",
247
+ "ph" => "Philippines",
248
+ "pic" => "Prince Edward Island",
249
+ "pk" => "Pakistan",
250
+ "pl" => "Poland",
251
+ "pn" => "Panama",
252
+ "po" => "Portugal",
253
+ "pp" => "Papua New Guinea",
254
+ "pr" => "Puerto Rico",
255
+ "pt" => "Portuguese Timor",
256
+ "pw" => "Palau",
257
+ "py" => "Paraguay",
258
+ "qa" => "Qatar",
259
+ "qea" => "Queensland",
260
+ "quc" => "Québec (Province)",
261
+ "rb" => "Serbia",
262
+ "re" => "Réunion",
263
+ "rh" => "Zimbabwe",
264
+ "riu" => "Rhode Island",
265
+ "rm" => "Romania",
266
+ "ru" => "Russia (Federation)",
267
+ "rur" => "Russian S.F.S.R.",
268
+ "rw" => "Rwanda",
269
+ "ry" => "Ryukyu Islands, Southern",
270
+ "sa" => "South Africa",
271
+ "sb" => "Svalbard",
272
+ "sc" => "SaintBarthélemy",
273
+ "scu" => "South Carolina",
274
+ "sd" => "South Sudan",
275
+ "sdu" => "South Dakota",
276
+ "se" => "Seychelles",
277
+ "sf" => "Sao Tome and Principe",
278
+ "sg" => "Senegal",
279
+ "sh" => "Spanish North Africa",
280
+ "si" => "Singapore",
281
+ "sj" => "Sudan",
282
+ "sk" => "Sikkim",
283
+ "sl" => "Sierra Leone",
284
+ "sm" => "San Marino",
285
+ "sn" => "Sint Maarten",
286
+ "snc" => "Saskatchewan",
287
+ "so" => "Somalia",
288
+ "sp" => "Spain",
289
+ "sq" => "Swaziland",
290
+ "sr" => "Surinam",
291
+ "ss" => "Western Sahara",
292
+ "st" => "SaintMartin",
293
+ "stk" => "Scotland",
294
+ "su" => "Saudi Arabia",
295
+ "sv" => "Swan Islands",
296
+ "sw" => "Sweden",
297
+ "sx" => "Namibia",
298
+ "sy" => "Syria",
299
+ "sz" => "Switzerland",
300
+ "ta" => "Tajikistan",
301
+ "tar" => "Tajik S.S.R.",
302
+ "tc" => "Turks and Caicos Islands",
303
+ "tg" => "Togo",
304
+ "th" => "Thailand",
305
+ "ti" => "Tunisia",
306
+ "tk" => "Turkmenistan",
307
+ "tkr" => "Turkmen S.S.R.",
308
+ "tl" => "Tokelau",
309
+ "tma" => "Tasmania",
310
+ "tnu" => "Tennessee",
311
+ "to" => "Tonga",
312
+ "tr" => "Trinidad and Tobago",
313
+ "ts" => "United Arab Emirates",
314
+ "tt" => "Trust Territory of the Pacific Islands",
315
+ "tu" => "Turkey",
316
+ "tv" => "Tuvalu",
317
+ "txu" => "Texas",
318
+ "tz" => "Tanzania",
319
+ "ua" => "Egypt",
320
+ "uc" => "United States Misc. Caribbean Islands",
321
+ "ug" => "Uganda",
322
+ "ui" => "United Kingdom Misc. Islands",
323
+ "uik" => "United Kingdom Misc. Islands",
324
+ "uk" => "United Kingdom",
325
+ "un" => "Ukraine",
326
+ "unr" => "Ukraine",
327
+ "up" => "United States Misc. Pacific Islands",
328
+ "ur" => "Soviet Union",
329
+ "us" => "United States",
330
+ "utu" => "Utah",
331
+ "uv" => "Burkina Faso",
332
+ "uy" => "Uruguay",
333
+ "uz" => "Uzbekistan",
334
+ "uzr" => "Uzbek S.S.R.",
335
+ "vau" => "Virginia",
336
+ "vb" => "British Virgin Islands",
337
+ "vc" => "Vatican City",
338
+ "ve" => "Venezuela",
339
+ "vi" => "Virgin Islands of the United States",
340
+ "vm" => "Vietnam",
341
+ "vn" => "Vietnam, North",
342
+ "vp" => "Various places",
343
+ "vra" => "Victoria",
344
+ "vs" => "Vietnam, South",
345
+ "vtu" => "Vermont",
346
+ "wau" => "Washington (State)",
347
+ "wb" => "West Berlin",
348
+ "wea" => "Western Australia",
349
+ "wf" => "Wallis and Futuna",
350
+ "wiu" => "Wisconsin",
351
+ "wj" => "West Bank of the Jordan River",
352
+ "wk" => "Wake Island",
353
+ "wlk" => "Wales",
354
+ "ws" => "Samoa",
355
+ "wvu" => "West Virginia",
356
+ "wyu" => "Wyoming",
357
+ "xa" => "Christmas Island (Indian Ocean)",
358
+ "xb" => "Cocos (Keeling) Islands",
359
+ "xc" => "Maldives",
360
+ "xd" => "Saint KittsNevis",
361
+ "xe" => "Marshall Islands",
362
+ "xf" => "Midway Islands",
363
+ "xga" => "Coral Sea Islands Territory",
364
+ "xh" => "Niue",
365
+ "xi" => "Saint KittsNevisAnguilla",
366
+ "xj" => "Saint Helena",
367
+ "xk" => "Saint Lucia",
368
+ "xl" => "Saint Pierre and Miquelon",
369
+ "xm" => "Saint Vincent and the Grenadines",
370
+ "xn" => "Macedonia",
371
+ "xna" => "New South Wales",
372
+ "xo" => "Slovakia",
373
+ "xoa" => "Northern Territory",
374
+ "xp" => "Spratly Island",
375
+ "xr" => "Czech Republic",
376
+ "xra" => "South Australia",
377
+ "xs" => "South Georgia and the South Sandwich Islands",
378
+ "xv" => "Slovenia",
379
+ # 'xx' => 'No place, unknown, or undetermined',
380
+ "xxc" => "Canada",
381
+ "xxk" => "United Kingdom",
382
+ "xxr" => "Soviet Union",
383
+ "xxu" => "United States",
384
+ "ye" => "Yemen",
385
+ "ykc" => "Yukon Territory",
386
+ "ys" => "Yemen (People's Democratic Republic)",
387
+ "yu" => "Serbia and Montenegro",
388
+ "za" => "Zambia"
389
+ }.freeze
390
+
391
+ def self.fetch(key)
392
+ TERMS.fetch(key)
393
+ end
394
+ end
395
+ end
396
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Marc
4
4
  module Vocab
5
- VERSION = "0.1.1"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marc-vocab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -28,6 +28,7 @@ files:
28
28
  - bin/console
29
29
  - bin/setup
30
30
  - lib/marc/vocab.rb
31
+ - lib/marc/vocab/countries.rb
31
32
  - lib/marc/vocab/geographic_area.rb
32
33
  - lib/marc/vocab/version.rb
33
34
  - marc-vocab.gemspec