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

Commit

Permalink
Add a list of items to exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jul 14, 2021
1 parent c89d5a6 commit e1a872b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bin/export-items
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e1a872b

Please sign in to comment.