This migrator is designed to export individual ContentDM collections to a CSV for refining. It then allows batch importing into Hyrax via a CSV upload.
Add this line to your application's Gemfile:
gem 'cdm_migrator'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cdm_migrator
Finally, run:
$ rails g cdm_migrator:install
- Add your ContentDM url and api port to the cdm_migrator.yml file.
- Navigate to the cdm_migrator/cdm/collection url to select your contentdm collection and what type of work you want to export it to and click "choose mappings".
- Map the ContentDM fields to your Hyrax work and file fields* and click "generate CSV".
- Refine the CSV as you see fit.
- Navigate to the cdm_migrator/csv/upload url; choose your multi-value seperator (default is |) and upload your CSV file.
- Done.
* cdm_migrator uses the generated Hyrax forms (ex. Hyrax::Forms::GenericWorkForm) in your host application to obtain it's terms for mapping. If you have added terms to your FileSet model extend the Hyrax::Forms::FileSetEditForm with FileSetForm in your host application so that the changes will be detected by the migrator.
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.