Greenstone tutorial exercise

Back to wiki
Back to index
Prerequisite: Moving a collection from DSpace to Greenstone
Devised for Greenstone version: 2.60
Modified for Greenstone version: 2.86|3.06

Moving a collection from Greenstone to DSpace

In this exercise you export a Greenstone collection in a form suitable for DSpace. It is possible to do this from the Librarian Interface's File menu, which contains an item called Export..., that allows you to export collections in different forms. However, to gain a deeper understanding of Greenstone, we perform the work by invoking a program from the Windows command-line prompt. This requires some technical skill; if you are not used to working in the command-line environment we recommend that you skip this exercise.

Using Greenstone from the command line

  1. Open a DOS window to access the command-line prompt. This facility should be located somewhere within your Start → Programs menu, but details vary between different Windows systems. If you cannot locate it and you are running Windows XP, select Start → Run and enter cmd in the popup window that appears. In either Windows Vista or Windows 7, click the Start button and type cmd in the search box at the bottom of the Start menu.

  1. In the DOS window, move to the home directory where you installed Greenstone. This is accomplished by something like:

    cd C:\Program Files\Greenstone

  1. Type:

    gs3-setup

    to set up the ability to run Greenstone command-line programs.

    On a Linux or Mac machine, you would similarly open a terminal, change directory into your Greenstone installation's top-level folder and type:

    source ./gs3-setup.sh

  1. Change directory into the folder containing the StoneD collection you built in the last exercise.

    cd web\sites\localsite\collect\stoned

  1. Run the following command to export the collection using the DSpace import/export format:

    perl -S export.pl -saveas DSpace -site localsite -removeold stoned

Exporting in Greenstone is an additive process. If you ran the export.pl command once again, the new files exported would be added—with different folder names—to those already in the export folder. For the kind of explorations we are conducting we might re-run the command several times. The -removeold option deletes files that have previously been exported.

  1. This command has created a new subfolder, web → sites → localsite → collect → stoned → export. Use the file browser to explore it. In it are the files needed to ingest this set of documents into DSpace.

You could equally well run the export.pl command on a different Greenstone collection and transfer the output to a DSpace installation by using DSpace's batch-import facility.


Copyright © 2005-2012 by the New Zealand Digital Library Project at the University of Waikato, New Zealand
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License.”