Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark Bussey mark-dce

  • Data Curation Experts
  • Minneapolis, MN
View GitHub Profile
@mark-dce
mark-dce / etd_ids.json
Last active Dec 23, 2021
ETD IDs as JSON
View etd_ids.json
// 20211223095436
// http://localhost:8993/solr/laevigata/select?fl=id&indent=on&q=has_model_ssim:Etd&rows=100000&sort=system_create_dtsi%20ASC&wt=json
{
"responseHeader": {
"status": 0,
"QTime": 5,
"params": {
"q": "has_model_ssim:Etd",
"indent": "on",
@mark-dce
mark-dce / etd_ids.csv
Last active Dec 23, 2021
ETD IDs as csv
View etd_ids.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
id
6d56zw601
br86b356q
4m90dv48q
1c18df763
4m90dv490
8336h188j
3t945q76s
0g354f20t
6395w709f
@mark-dce
mark-dce / rails console input.txtx
Created Nov 12, 2021
New Work Creation (Abridged)
View rails console input.txtx
stack = Hyrax::CurationConcern.actor
curation_concern = Work.new
user = User.where(email: 'mark@curationexperts.com').first
attributes = {:title=>["Testing Actor Stack"], :rights_statement=>["http://rightsstatements.org/vocab/UND/1.0/"], :creator=>["Me"]}
env = Hyrax::Actors::Environment.new(curation_concern, user.ability, attributes)
stack.create(env)
@mark-dce
mark-dce / rail console ouput.txt
Created Nov 12, 2021
New Work Creation Using the Actor Stack (Unabridged)
View rail console ouput.txt
irb(main):037:0> stack = Hyrax::CurationConcern.actor
=> #<Hyrax::Actors::OptimisticLockValidator:0x00007f93f0c7c280 @next_actor=#<Hyrax::Actors::CreateWithRemoteFilesActor:0x000...
irb(main):038:0> user = User.where(email: 'mark@curationexperts.com').first
User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."email" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["email", "mark@curationexperts.com"], ["LIMIT", 1]]
=> #<User id: 3, email: "mark@curationexperts.com", created_at: "2021-11-10 22:05:32", updated_at: "2021-11-10 22:06:23", gu...
irb(main):039:0> attributes = {:title=>["Testing Actor Stack"], :rights_statement=>["http://rightsstatements.org/vocab/UND/1.0/"]
, :creator=>["Me"]}
=> {:title=>["Testing Actor Stack"], :rights_statement=>["http://rightsstatements.org/vocab/UND/1.0/"], :creator=>["Me"]}
irb(main):040:0> env = Hyrax::Actors::Environment.new(curation_concern, user.ability, attributes)
Role Load (0.8ms) SELECT "roles".* FROM "roles" INNER JOIN "roles_users" ON "roles"."id" = "role
View gist:004ad0d3c5b03a62ff223e016a3627dc
in /Users/mark/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hyrax-3.1.0/app/controllers/concerns/hyrax/works_controller_behavior.rb
197: # @return [#errors]
198: def create_work
199: byebug
200: case curation_concern
201: when ActiveFedora::Base
=> 202: actor.create(actor_environment)
203: else
204: form = build_form
205:
View 2r36tx551-manifest.json
{"@context":"http://iiif.io/api/presentation/2/context.json","@type":"sc:Manifest","@id":"https://tenejo.curationexperts.com/concern/works/2r36tx551/manifest","label":"Clubs","description":["Cards in the hearts suit"],"sequences":[{"@type":"sc:Sequence","@id":"https://tenejo.curationexperts.com/concern/works/2r36tx551/manifest/sequence/normal","rendering":[],"canvases":[{"@type":"sc:Canvas","@id":"https://tenejo.curationexperts.com/concern/works/2r36tx551/manifest/canvas/r781wg01v","label":"As-Tr%C3%A8fles-Recto.tiff","width":766,"height":1141,"images":[{"@type":"oa:Annotation","motivation":"sc:painting","resource":{"@type":"dctypes:Image","@id":"https://tenejo.curationexperts.com/cantaloupe/iiif/2/r781wg01v%2Ffiles%2F3597e6e0-8095-4af0-9843-9df4c36f6431%2Ffcr:versions%2Fversion1/full/600,/0/default.jpg","height":1141,"width":766,"format":"jpg","service":{"@context":"http://iiif.io/api/image/2/context.json","@id":"https://tenejo.curationexperts.com/cantaloupe/iiif/2/r781wg01v%2Ffiles%2F3597e6e0-8095-4af0-9843
@mark-dce
mark-dce / postcards_from_paces.css
Created Jul 12, 2021
Postcards from Places colors
View postcards_from_paces.css
/* Color Theme Swatches in Hex */
.My-Color-Theme-1-hex { color: #3C731C; }
.My-Color-Theme-2-hex { color: #A6D433; }
.My-Color-Theme-3-hex { color: #BDBA37; }
.My-Color-Theme-4-hex { color: #D4C133; }
.My-Color-Theme-5-hex { color: #C9A830; }
/* Color Theme Swatches in RGBA */
.My-Color-Theme-1-rgba { color: rgba(60, 115, 28, 1); }
.My-Color-Theme-2-rgba { color: rgba(166, 212, 51, 1); }
View staging-batch-266.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
oid
2111711
2111712
2111714
2111715
2111717
2111718
2111719
2111720
2111721
@mark-dce
mark-dce / 16854582.json
Last active Mar 4, 2020
Mark's Sample Manifest - YCAL MSS 702
View 16854582.json
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@type": "sc:Manifest",
"@id": "https://raw.githubusercontent.com/curationexperts/YUL-DC/manifests/mark-dce/16854582.json",
"label": "Mark's Sample Manifest - YCAL MSS 702",
"metadata": [
{
"label": "Title",
"value": [
"[Career files unnumbered folder 9] The Thanks Be To Grandmother Winifred Foundation Grantees to be photographed"
@mark-dce
mark-dce / manifest.json
Last active Feb 24, 2020
Sample IIIF Manifest - from tutorial
View manifest.json
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@type": "sc:Manifest",
"@id": "http://localhost:3000/manifest.json",
"label": "Papillons",
"description": "Four patterns inspired by butterflies.",
"attribution": "Special Collections Research Center at NCSU Libraries",
"logo": "http://localhost:3000/logo.jpg",
"sequences": [
{