CDL would like a larger set of arks with associated jsonld metadata. I proposed to do this with about 100 records. This is the way that I will create these.
DAMS micro-service
There are lots of ways to create the metadata that we need. I've created a new micro-service for our DAMS to standardize that creation. So, you can go to any record in our dams, and retrieive an appropriate JSON-LD metadata entry from the DAMS. For example
ark=ark:/87287/d71941
http -P b --follow https://next.dams.library.ucdavis.edu/$ark/svc:ezid
Once we have this in place we can quickly use this service to create test versions of this setup. In this case we will be using the schema.org attribute to store this. Here's the way to create a new example, using ezid We will copy over the erc.* values
ezid login --auth=ucd-qjhart
dams=https://next.dams.library.ucdavis.edu
ark=ark:/87287/d71941
eval $(ezid get --array $i); anvl[schema.org]="$(http -P b --follow $dams/$i/svc:ezid | jq -c .)";
ezid mint erc.who:${anvl[erc.who]} erc.when:${anvl[erc.when]} erc.what:"${anvl[erc.what]}" schema.org:"${anvl[schema.org]}"
# Responds with ark:/99999/fk4rz0hk0v
Then you can verify that json is all fine, with this
From a download of an ezid CSV dump of my records, I can get 20 random examples with
csv=a1a3bbac81.csv
cnt=20
random=$(for i in $(csvtool col 3 $csv | grep 87287); do echo $RANDOM,$i; done | sort -n | head -$cnt | csvtool col 2 -)
And then create the temporary records with:
dams=https://next.dams.library.ucdavis.edu
for ark in $random; do
eval $(ezid get --array $i); anvl[schema.org]="$(http -P b --follow $dams/$i/svc:ezid | jq -c .)";
ezid mint erc.who:"${anvl[erc.who]}" erc.when:"${anvl[erc.when]}" erc.what:"${anvl[erc.what]}" schema.org:"${anvl[schema.org]}" | tee --append random.tmp
done
Example
Here is an example of running the above scripts to create 20 example schema.org entries.
CDL would like a larger set of arks with associated jsonld metadata. I proposed to do this with about 100 records. This is the way that I will create these.
DAMS micro-service
There are lots of ways to create the metadata that we need. I've created a new micro-service for our DAMS to standardize that creation. So, you can go to any record in our dams, and retrieive an appropriate JSON-LD metadata entry from the DAMS. For example
responds with:
Example Temporary creations
Once we have this in place we can quickly use this service to create test versions of this setup. In this case we will be using the
schema.org
attribute to store this. Here's the way to create a new example, usingezid
We will copy over theerc.*
valuesThen you can verify that json is all fine, with this
20 random versions
From a download of an ezid CSV dump of my records, I can get 20 random examples with
And then create the temporary records with:
Example
Here is an example of running the above scripts to create 20 example schema.org entries.