Greenstone tutorial exercise

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

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. If you're on Windows, 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.

    If you're on a Unix system or on a Mac, open a terminal.

  1. In the DOS window or unix terminal, move to the home directory where you installed Greenstone. On Windows, this is accomplished by something like:

    cd C:\Program Files\Greenstone

  1. Type:


    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 ./setup.bash

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

    cd collect\stoned

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

    perl -S -saveas DSpace -removeold stoned

Exporting in Greenstone is an additive process. If you ran the 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, 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 command on a different Greenstone collection and transfer the output to a DSpace installation by using DSpace's batch-import facility.

Copyright © 2005-2016 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.”