Archive

Archive for the ‘OhioLINK’ Category

CONTENTdm to DSpace

August 19th, 2009 admin Comments off

There are probably lots of ways to do this, but this is mine.  As part of our migration to the OhioLINK DRC I’ve created a quick php script to 1) take the default export format of CONTENTdm, 2) translate a mapping of fields to the appropriate dSpace ones, and 3) create the DSpace bulk submission package for it. You will need php5+ running on a unix-like system with allow_fopen set to true. It may work on Windows, but I haven’t tested it and I probably won’t. You could upgrade your Windows Installation and have better luck though.

You can find the scripts here. CAVEAT: These are ugly hacks at best http://staff.lib.muohio.edu/~millarj/cdmtab2dspace/

Instructions:

  1. Export your data from CONTENTdm in the control panel. Select a Tab Delimited export and make sure to check “Return field names in first record” cdm-export
  2. Next, open the resulting text file in a spreadsheet application of your choice. If you don’t want to munge dates and other non-text data, make sure each column is imported as the “Text” type. Excel for example, has a hard time with ISO dates.
  3. Add a row to the top of the spreadsheet and place the appropriate DSpace fieladn mes (minus the dc. prefix) above the CONTENTdm field to be mapped. If you want to skip a field, just use “skip” as the DSpace field label.
  4. Save it back out as a tab-delimited file.
  5. Download the script and edit it to customize to your hearts content.
  6. Run the script from a unix/linux/macosx commandline “php cdmtab2dspace.php”

At the top of the script are various customizations/configurations. To see how things will look, set $test_mode = “on” When ready to run it live, change that bit to “off”

In particular, customize/rewrite the “move_bitstreams” function to, you guessed it, move the bitstreams (digital objects) from wherever you have them into the submission package.

Categories: CONTENTdm, DSpace, OhioLINK, recipes Tags:

Switch to our mobile site