sul-dlss / preservation_catalog

Rails application to track, audit and replicate archival artifacts associated with SDR objects.
https://sul-dlss.github.io/preservation_catalog/
Other
2 stars 2 forks source link

A tool to identify which GIS items have a data.zip #2310

Closed edsu closed 8 months ago

edsu commented 8 months ago

Why was this change made? 🤔

This is a temporary utility to help in GIS remediation. Currently it is only checking to see if a data.zip can be found in preservation. For context see: https://github.com/sul-dlss/gis-robot-suite/issues/829

The utility will be modified to extract files from the data.zip and write them to an external location. Once it has been used, and remediation is complete it can be deleted.

How was this change tested? 🤨

It was run in prescat stage.

peetucket commented 8 months ago

Just to note that in Rails apps like this you can also take advantage of the "rails runner" command to write a class and then execute in the context of the Rails environment of choice (and it will have the full context of the app, including any settings, libraries, gems etc.). Lets you skip some of that boilerplate setup code in a one off script like this

https://guides.rubyonrails.org/command_line.html#bin-rails-runner

edsu commented 8 months ago

Thanks for that doc link @peetucket -- I'll give that a try in the next iteration of this.