Skip to content
This repository was archived by the owner on Jan 8, 2022. It is now read-only.
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sul-dlss-deprecated/hydrus
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7581b3aa1fd61cb1d3dbb380c30893fbfa4e0646
Choose a base ref
..
head repository: sul-dlss-deprecated/hydrus
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7dc4ebbb78bc3ef6527425d68c4d9ae2877472cb
Choose a head ref
Showing with 30 additions and 6 deletions.
  1. +16 −6 Gemfile.lock
  2. +14 −0 bin/export-items
22 changes: 16 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -133,7 +133,7 @@ GEM
mime-types (>= 1.16)
ssrf_filter (~> 1.0)
chronic (0.10.2)
cocina-models (0.59.0)
cocina-models (0.59.1)
activesupport
dry-struct (~> 1.0)
dry-types (~> 1.1)
@@ -295,6 +295,7 @@ GEM
i18n (1.8.10)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
io-wait (0.1.0)
iso-639 (0.2.10)
jbuilder (2.11.2)
activesupport (>= 5.0.0)
@@ -341,7 +342,8 @@ GEM
mime-types-data (3.2021.0225)
mini_exiftool (2.10.1)
mini_mime (1.1.0)
mini_portile2 (2.5.1)
mini_portile2 (2.5.2)
net-ftp (~> 0.1)
minitest (5.14.4)
moab-versioning (4.4.1)
druid-tools (>= 1.0.0)
@@ -356,15 +358,21 @@ GEM
msgpack (1.4.2)
multipart-post (2.1.1)
mysql2 (0.4.10)
net-ftp (0.1.2)
net-protocol
time
net-protocol (0.1.1)
io-wait
timeout
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (6.1.0)
netrc (0.11.0)
nio4r (2.5.7)
nokogiri (1.11.5)
nokogiri (1.11.6)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
nokogiri (1.11.5-x86_64-linux)
nokogiri (1.11.6-x86_64-linux)
racc (~> 1.4)
nokogiri-happymapper (0.8.1)
nokogiri (~> 1.5)
@@ -489,7 +497,7 @@ GEM
rubocop-ast (>= 1.5.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.5.0)
rubocop-ast (1.7.0)
parser (>= 3.0.1.1)
ruby-enum (0.9.0)
i18n
@@ -556,6 +564,8 @@ GEM
thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.10)
time (0.1.0)
timeout (0.1.1)
twitter-typeahead-rails (0.11.1.pre.corejavascript)
actionpack (>= 3.1)
jquery-rails
@@ -574,7 +584,7 @@ GEM
i18n
warden (1.2.9)
rack (>= 2.0.9)
websocket-driver (0.7.3)
websocket-driver (0.7.4)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
whenever (0.11.0)
14 changes: 14 additions & 0 deletions bin/export-items
Original file line number Diff line number Diff line change
@@ -7,6 +7,17 @@
COLLECTION_DRUIDS_LIST = 'collection_druids.txt'
GRAVEYARD_APO = 'druid:kg712km1576'

# This list from: https://docs.google.com/spreadsheets/d/1Gu0TIUpNByNgNtFDn5MJARUvtsgcNXJAHiKf5s_NsUc/edit#gid=0
# NOTE: we don't need to worry about the "hydrus object with DOI", because these are not returned in the query
# for Hydrus::Items as they have been converted to Dor::Item.
ITEMS_TO_EXCLUDE = %w[
druid:ty334nd6571
druid:bx749bs2681
druid:zc000fq4044
druid:pr213sh5046
druid:jr671fk0644
]

require_relative '../config/environment'

# Monkey-patch AF to allow using HTTP POST (for querying items by their collection)
@@ -128,6 +139,9 @@ list.each do |item|
elsif item.catkey.present?
warn "Skipping #{item.pid} because it has a catkey"
next
elsif ITEMS_TO_EXCLUDE.include? item.pid
warn "Skipping #{item.pid} because it is on the list of items to exclude"
next
end
attributes = serialize(item)
puts attributes.compact.to_json