...
- You can use the Krikri Rails console, and have already used the necessary comands to find the Activity that represents the records that you want.
You can create a directory on the Heidrun application server's filesystem, likeĀ
/var/tmp/rdf-files
and make it owned by the Heidrun application's user.
Modify this as necessary and then copy and paste it into the Rails console:
Code Block | ||
---|---|---|
| ||
# Here the example activity is 220, a mapping. Krikri::Activity.find(220).entity_uris.take(1000).each { |u| agg = DPLA::MAP::Aggregation.new(u) agg.get id = agg.id.split('/').last # Assume /var/tmp/rdf-files has been created and is owned by dpla:dpla File.open("/var/tmp/rdf-files/#{id}.ttl", 'w') { |file| file.write(agg.to_ttl) file.close } } |
...