User Tools

Site Tools


en:user_advanced:oai

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:user_advanced:oai [2018/07/30 23:01] – [Serving OAI Data using Greenstone] kjdonen:user_advanced:oai [2018/07/30 23:13] – [Downloading on the command line] kjdon
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. 
  
 +==== Downloading on the command line ====
 +
 +You can also download OAI records on the command line, using 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.
 +
 +  * **Set up the Greenstone environment** in the terminal by running one of the following:
 +<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:
 +
 +<code>
 +perl -S downloadinfo.pl OAIDownload
 +</code>
 +
 +The options are the same as you can see in the GLI OAI download panel, listed above. 
 +
 +  ***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 documents) will 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===== ===== Serving OAI Data using Greenstone=====
  
en/user_advanced/oai.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1