Skip to content

Commit

Permalink
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions lib/folio/eresource_holdings_builder.rb
Original file line number Diff line number Diff line change
@@ -37,8 +37,7 @@ def build

def fulltext_links
electronic_location_fields.select do |field|
MarcLinks::Processor.new(field).link_is_fulltext? &&
field.subfields.none? { |sf| sf.code == 'u' && MarcLinks::GSB_URL_REGEX.match?(sf.value) }
MarcLinks::Processor.new(field).link_is_fulltext?
end
end

1 change: 0 additions & 1 deletion lib/marc_links.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

module MarcLinks
GSB_URL_REGEX = %r{^https?://www.gsb.stanford.edu/jacksonlibrary/services/}
PROXY_URL_REGEX = /stanford\.idm\.oclc\.org/
SFX_URL_REGEX = Regexp.union(%r{^https?://library.stanford.edu/sfx\?.+},
%r{^https?://caslon.stanford.edu:3210/sfxlcl3\?.+})
4 changes: 2 additions & 2 deletions lib/traject/config/folio_config.rb
Original file line number Diff line number Diff line change
@@ -913,7 +913,7 @@ def holdings(record, context)

#
# # URL Fields
# get full text urls from 856, then reject gsb forms
# get full text urls from 856
# get all 956 subfield u containing fulltext urls that aren't SFX
to_field 'url_fulltext' do |record, accumulator|
Traject::MarcExtractor.new('856u:956u', alternate_script: false).collect_matching_lines(record) do |field, spec, extractor|
@@ -922,7 +922,7 @@ def holdings(record, context)
accumulator.concat extractor.collect_subfields(field, spec)
end

accumulator.reject! { |v| v.blank? || MarcLinks::GSB_URL_REGEX.match?(v) }
accumulator.reject! { |v| v.blank? }
end

# returns the URLs for supplementary information (rather than fulltext)

0 comments on commit 6c8c060

Please sign in to comment.