This page is in the 'old' namespace, and was imported from our previous wiki. We recommend checking for more up-to-date information using the search box.

Command Line Building

The Greenstone Developer's Guide has detailed step by step instructions on building collections from the command line. Here we just give a quick overview.

Windows

  • Open up a DOS prompt
  • Navigate to the greenstone directory
 cd "C:\Program Files\greenstone"
  • Set up the greenstone environment
 setup.bat
  • Make a new collection (called mycoll)
 perl -S mkcol.pl mycoll
  • Change to the mycoll directory
 cd collect\mycoll
  • Collect your documents and put them into the import directory
  • Configure the collection by editing etc\collect.cfg
  • Import the source documents into greenstone archive format
 perl -S import.pl mycoll
  • Build the indexes and classifiers for the collection
 perl -S buildcol.pl mycoll
  • Make the collection "live" by deleting the index directory and rename the building directory to index

Linux/Mac OS X

  • Open up a terminal
  • Navigate to the greenstone directory
 cd ".../greenstone"
  • Set up the greenstone environment
 source setup.bash
  • Make a new collection (called mycoll)
 mkcol.pl mycoll
  • Change to the mycoll directory
 cd collect/mycoll
  • Collect your documents and put them into the import directory
  • Configure the collection by editing etc/collect.cfg
  • Import the source documents into greenstone archive format
 import.pl mycoll
  • Build the indexes and classifiers for the collection
 buildcol.pl mycoll
  • Make the collection "live" by deleting the index directory and rename the building directory to index
 rm -r index; mv building index

Using the GLI with command line building

In some circumstances you may want to use the Librarian Interface to design your collection, then actually build it using command line building. When you click "Create Collection" in the GLI, its carrying out the last three steps: import, buildcol, and renaming building to index. So you can do the earlier steps using the Librarian Interface, and then import and build on the command line. If you are generating archive files by hand, then you will need to do this as you will not be able to use the Librarian Interface to "build" the collection.