This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TODO: There is one problem with this approach | |
# We have no way to differentiate the cocina.json/public/mods files from purl from the files from stacks. | |
# It may be possible that one of the stacks files could have a name collision (e.g. if the name was "public") | |
require 'ocfl' | |
require 'druid-tools' | |
DRUIDS = %w[ | |
bd072pn1284 | |
] | |
OCFL_ROOT = '/stacks/ocfl-experiment-jcoyne' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TOKEN = ENV['GH_TOKEN'] | |
REPO = ENV['GH_REPO'] | |
ids = `curl -s \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Authorization: token #{TOKEN}" \ | |
https://api.github.com/repos/#{REPO}/actions/caches | jq '.actions_caches[].id'` | |
ids.split.each do |id| | |
`curl -s \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -10000 dor_access_ssl.log | grep 'content ' | grep 200 | sed 's/.\+\(GET \/fedora\/objects\/druid.\+datastreams.\+\/content.\+\)HTTP\/1.1" 200 \([0-9]\+\).\+/\2 \1/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
description: Specification for Cocina Models | |
version: 1.0.0 | |
title: Cocina Models | |
license: | |
name: Apache 2.0 | |
url: 'http://www.apache.org/licenses/LICENSE-2.0.html' | |
paths: | |
/validate/Description: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
description: Specification for Cocina Models | |
version: 1.0.0 | |
title: Cocina Models | |
license: | |
name: Apache 2.0 | |
url: 'http://www.apache.org/licenses/LICENSE-2.0.html' | |
paths: | |
/validate/DescriptiveBasicValue: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Book < ActiveFedora::Base | |
include Hydra::Works::Work | |
end | |
class Page < ActiveFedora::Base | |
include Hydra::Works::Work | |
end | |
book = Book.new | |
page = Page.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs = FileSet.find('mp48sc83h') | |
file_name = 'tmp/uploads/mp/48/sc/83/letz_01_0020_019.tif' | |
service = Hydra::Works::CharacterizationService.new(fs, file_name, {}) | |
fits_output = service.send(:extract_metadata, file_name) | |
terms = service.send(:parse_metadata, fits_output) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):006:0> local_file = File.open('spec/fixtures/images/world.png') => #<File:spec/fixtures/images/world.png> | |
irb(main):007:0> local_file = Hydra::Derivatives::IoDecorator.new(local_file) | |
=> #<File:spec/fixtures/images/world.png> | |
irb(main):008:0> local_file.mime_type = 'application/foo' | |
=> "application/foo" | |
irb(main):009:0> local_file.original_name = 'world.png' | |
=> "world.png" | |
irb(main):010:0> Hydra::Works::AddFileToFileSet.call(fs, local_file, :original_file, versioning: false) | |
Unable to check /var/folders/9t/rygbnddx0b1ckw6tjs3m18qm0000gq/T/20160531-85153-cfleh6 for viruses because no virus scanner is defined | |
=> #<FileSet id: "ww72bb63r", label: nil, relative_path: nil, import_url: nil, part_of: [], resource_type: [], creator: [], contributor: [], description: [], keyword: [], rights: [], publisher: [], date_created: [], subject: [], language: [], identifier: [], based_near: [], related_url: [], bibliographic_citation: [], source: [], head: [], tail: [], depositor: "jcoyne", title: [], date_uploaded: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
druids = Sidekiq::RetrySet.new do |job| | |
((klass, method, args) = YAML.load(job.args[0])) | |
end.map do |doc| | |
doc['error_message'].sub(%r{.*http://sul-lyberservices-prod.stanford.edu/workflow//objects/(druid:.{11})/.*}, '\1') | |
end | |
druids = ["druid:dv067yc0690", "druid:dt469gf3081", "druid:ky920wg4012", "druid:bk337cj4274", "druid:fr259mm2512", "druid:fv474yq5934", "druid:dq379sd3137", "druid:jv189bp0832", "druid:dv627hd0865", "druid:fv162qg9812", "druid:gz880xr9536", "druid:jz243nw3598", "druid:bz827kn6480", "druid:fp744tg4855", "druid:jg658nj5435", "druid:jk783gq9820", "druid:px855nm9126", "druid:ch376fv6873", "druid:bj513tx7008", "druid:mp546mj3927", "druid:bh956cq9786", "druid:df253qd2344", "druid:gt608br6686", "druid:bq013ky8003", "druid:ms951zt0048", "druid:fn279jk7616", "druid:fv217kn2691", "druid:fk707gf7514", "druid:cz014dj2495", "druid:cb475qw5208", "druid:hx396ky8951", "druid:cw372fd1981", "druid:hq532jr8640", "druid:jt102my9479", "druid:bx756rm7202", "druid:fr190hz8212", "druid:dx487gv0982", "drui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Forked from https://gist.githubusercontent.com/camillevilla/16b53c50eccc11de0cb40ee0be7dcf03/raw/51f2473d5b04bb72e835ac9168381d87c0961d31/github-pr-urls.js | |
// PR search at https://github.com/pulls | |
// is:pr org:sul-dlss head:update-dependencies created:2018-05-08..2018-05-09 | |
// Repo order used in our update script and status table | |
// https://github.com/sul-dlss/access-update-scripts/blob/master/infrastructure/ruby | |
var repoList= "argo common-accessioning dlme dlme-transform dor-services-app dor_indexing_app dor-fetcher-service gis-robot-suite google-books hydra_etd hydrus lyberservices-scripts modsulator-app-rails preservation_catalog preservation_robots pre-assembly repository-api rialto-etl rialto-webapp robot-console sul_pub sdr-services-app was-registrar-app was_robot_suite was-thumbnail-service workflow-server-rails" | |
repoList = repoList.split(' ') |
NewerOlder