Greenstone tutorial exercise
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
- 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.
- In the DOS window, move to the home directory where you installed Greenstone. This is accomplished by something like:
cd C:\Program Files\Greenstone
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:
- Change directory into the folder containing the StoneD collection you built in the last exercise.
- 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.
- 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.