Skip to content
Michael Bond edited this page Nov 21, 2016 · 4 revisions

Exporting

Exporting is accomplished by writing exports scripts for each project, form, collection, etc, that needs to be exported. MFCS provides a set of Dublin Core export scripts, but anything else will need a custom script written.

All exporting happens in the same basic fashion.

  1. A directory is created under public_html/exporting/Name_Of_My_Export/index.php
  • This script defines how data is exported (json, xml, csv, etc ...)
  • Defines where and how digital items are exported to (copy derivatives, copy originals, which items, etc, as a tar.gz?, etc ...)
  • Optionally these scripts can create a control file. The purpose of the control file is to aid with automatically importing exports to another system. Because MFCS is platform agnostic, MFCS does not know how to import into other systems. It is up to individuals to create the import scripts to other systems. The control file should have a bare-minimum amount of information to import into another system. Tested with Hydra and DLXS. If additional information is needed, it may be required to either update the control file yaml file, or overload an existing field.
  1. Go to the mfcs /exports/ page. Click on the export link.
  2. What happens here is up to how the exports have been configured.
  • Examples: WVU Libraries utilizes 4 exporting methods
    1. provide links in the resulting page to download the metadata (as json, xml, csv as required by import system), and a link to a gzipped archive of all the digital items. These would then be copied to the server that would handle the importing.
    2. create the same files as above, but leave them on the server, because of their size. THey would then be copied via sftp to another server.
    3. Export scripts that run ONLY from the command line. This is usually done on very large export sets, when apache will time out waiting for the dataset to complete.
    4. Export to a shared NFS share, where an export control file is created. Another server with cron processes listen for this file and import into hydra automatically.

Data Cleanup

copy the file mfcs/public_html/includes/classes/cleanup_mapping_example.php to mfcs/public_html/includes/classes/cleanup_mapping.php

once it is copied it will make the cleanup class available. This file provides an example array that is looped though (in the order in which it is defined) of regular expression patterns to match and their replacements. You can modify this to suite the needs of your data and export requirements.

some export functions, such as the default Dublin Core export, will test for the existence of this class and use it if it is available.

Clone this wiki locally