gared 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/lib/gared/primo.rb +14 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f355eef9dbb29f321690a0ad9aaaca1513474f13cf9916245d0196a31f40336
|
4
|
+
data.tar.gz: 3ea6acb4fb92f7c1d632602982877b2bee3151212bb05616d2768bde177df873
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcc7399021ca90d91d876441a1f5e4fcc6c99e737eb25fe144297661108f09dba83dab3eb65481931a0ccf739ae65f4d2cc99173fff186886ffdeb1e9c5f2b44
|
7
|
+
data.tar.gz: bd9d379ce171fbbb9004c0336467777d91b72c31f4d05bf7761c99f36cb1334fb1b1f350df9293ff529535593da67d646d3a87666ccb660e74cf439611b12c7b
|
data/lib/gared/primo.rb
CHANGED
@@ -47,7 +47,12 @@ module Gared
|
|
47
47
|
p.author_line = deets['creator'].join('; ')
|
48
48
|
p.author_line += deets['contributor'].join('; ') if deets['contributor']
|
49
49
|
p.language = deets['language'].join('; ')
|
50
|
-
p.notes = deets['format'].join('; ')
|
50
|
+
p.notes = deets['format'].join('; ')
|
51
|
+
if r['pnx']['display'] && r['pnx']['display']['subject']
|
52
|
+
p.notes += r['pnx']['display']['subject'].join('; ')
|
53
|
+
elsif r['pnx']['search'] && r['pnx']['search']['subject']
|
54
|
+
p.notes += r['pnx']['search']['subject'].join('; ')
|
55
|
+
end
|
51
56
|
p.publisher_line = deets['publisher'].join('; ')
|
52
57
|
p.pub_year = deets['creationdate'].join('; ')
|
53
58
|
p.source_id = r['pnx']['control']['sourcerecordid'].join('; ')
|
@@ -69,10 +74,17 @@ module Gared
|
|
69
74
|
h.source_name = 'Primo:'+@options[:vid]
|
70
75
|
|
71
76
|
begin
|
72
|
-
h.location = r['pnx']['search']['callnumber'].join('; ')
|
77
|
+
h.location = r['pnx']['search']['callnumber'].join('; ') # Haifa University style
|
73
78
|
rescue Exception # We're skipping things without a callnumber, as they are not resources within the library itself.
|
74
79
|
puts $!
|
75
80
|
end
|
81
|
+
if h.location.nil?
|
82
|
+
begin
|
83
|
+
h.location = r['delivery']['bestlocation']['callNumber'] # Tel Aviv University style
|
84
|
+
rescue Exception
|
85
|
+
puts $!
|
86
|
+
end
|
87
|
+
end
|
76
88
|
p.add_holding(h)
|
77
89
|
ret << p
|
78
90
|
rescue Exception
|