Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:user_advanced:oai [2018/07/31 11:01]
kjdon [Serving OAI Data using Greenstone]
en:user_advanced:oai [2018/07/31 11:20] (current)
kjdon [Testing]
Line 20: Line 20:
 ^Option^Description^ ^Option^Description^
 |Source URL (''​-url <​string>''​)|(REQUIRED) OAI repository URL| |Source URL (''​-url <​string>''​)|(REQUIRED) OAI repository URL|
-|Metadata prefix (''​-metadata_prefix <​string>''​)|The metadata format used in the exported metadata, e.g. oai_dc, qdc, etc. (//Default: oai_dc//)|+|Metadata prefix (''​-metadata_prefix <​string>''​)|The metadata format used in the exported metadata, e.g. oai_dc, qdc, etc. The formats available depend on what is offered by the OAI server. All repositories must offer oai_dc. (//Default: oai_dc//)|
 |Restrict to set (''​-set <​string>''​)| Restrict the download to the specified set in the repository| |Restrict to set (''​-set <​string>''​)| Restrict the download to the specified set in the repository|
 |Get document (''​-get_doc''​)|Download the source document if one is specified in the record| |Get document (''​-get_doc''​)|Download the source document if one is specified in the record|
-|Only include file types (''​-get_doc_exts <​string>''​)|Permissible filename extensions of documents ​to get (//Default: ''​doc,​pdf,​ppt''//​)|+|Only include file types (''​-get_doc_exts <​string>''​)|If downloading source ​documents, only download those whose file extensions match this list. (//Default: ''​doc,​pdf,​ppt''//​)|
 |Max records (''​-max_records <​int>''​)|Maximum number of records to download. If not specified, will download all records.| |Max records (''​-max_records <​int>''​)|Maximum number of records to download. If not specified, will download all records.|
  
Line 46: Line 46:
 then Greenstone downloads the page and scans though it looking for ''​href'''​s that match the specified file extensions, and downloads these. ​ then Greenstone downloads the page and scans though it looking for ''​href'''​s that match the specified file extensions, and downloads these. ​
  
-===== Serving OAI Data using Greenstone=====+==== Downloading on the command line ====
  
-Greenstone comes with a built-in ​OAI data providercalled ​**oaiserver**. A configuration file provides options for the set up of the server. Collections can opt in or out of the server, and each collection will be advertised as an OAI set. Multiple collections can be grouped into a single OAI set using Greenstone'​s OAI super set mechanism.+You can also download ​OAI records on the command lineusing the perl script that GLI uses in the background: ​**downloadfrom.pl**. There is lots of information about command line downloading on [[en:​user_advanced:​command_line_download|downloading from the command line]] page.
  
-  * [[oai_server_gs3|Greenstone ​3 OAI server ​setup and configuration]] +  * **Set up the Greenstone ​environment** in the terminal by running one of the following:​ 
-  * [[oai_server_gs2|Greenstone 2 OAI server ​setup and configuration]]+<​code>​ 
 +source gs3-setup.sh (linux/​MacOS,​ gs3) 
 +gs3-setup (Windows, gs3) 
 +source setup.bash (Linux/​MacOS,​ gs2) 
 +setup (Windows, gs2) 
 +</​code>​
  
 +  * **To see the options available**,​ run:
  
-====Testing==== ​+<​code>​ 
 +perl -S downloadinfo.pl OAIDownload 
 +</​code>​
  
-Once you have your OAI service in place, testing ​can be done via online validation facilities such as the following: http://​www.openarchives.org/​data/​registerasprovider.html or http://​re.cs.uct.ac.za/​.+The options are the same as you can see in the GLI OAI download panel, listed above
  
-The former only verifies the Identify command, while extensive testing can be performed via the later one (called ​//Repository Explorer//).+  ***An example usage would be:** 
 +<​code>​ 
 + perl -S downloadfrom.pl -mode OAI -url http://​www.nzdl.org/​cgi-bin/​oaiserver.cgi -set demo -max_records 5 
 +</​code>​ 
 + 
 +This will try to download 5 records from the set //demo// at the nzdl.org'​s OAI server. 
 + 
 +The records (and optionally documentswill be downloaded into the folder the script is run from. To change this, use the **-cache_dir full-path-to-folder** option. 
 +===== Serving OAI Data using Greenstone===== 
 + 
 +Greenstone comes with a built-in OAI data provider, called **oaiserver**. A configuration file provides options for the set up of the server. Collections can opt in or out of the server, and each collection will be advertised as an OAI set. Multiple collections can be grouped into a single OAI set using Greenstone'​s OAI super set mechanism. 
 + 
 +  * [[oai_server_gs3|Greenstone 3 OAI server setup and configuration]] 
 +  * [[oai_server_gs2|Greenstone 2 OAI server setup and configuration]]
  
-The Greenstone OAI server must be publically accessible over the Internet to use these validation tools.