Skip to content

kiivihal/goharvest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goharvest

OAI-PMH harvester implementations for golang.

Hello OAI

package main

import (
	"github.com/kiivihal/goharvest/oai"
	"fmt"
)

func main() {
	(&oai.Request{
		BaseURL:"http://services.kb.nl/mdo/oai", Set:"DTS", MetadataPrefix:"dcx",
		From: "2012-09-06T014:00:00.000Z",
	}).HarvestRecords(func (record *oai.Record) {
		fmt.Printf("%s\n\n", record.Metadata.Body[0:500])
	})
}

Demo sources

Sources for the demo's can be found in the bin dir

Prerequisites

  • The go tool
  • git

Get started

Clone the project into your Go workspace

$ cd $GOPATH/src
$ mkdir -p github.com/kiivihal
$ cd github.com/kiivihal
$ git clone https://github.com/kiivihal/goharvest.git

Starting the demo's:

$ go run $GOPATH/src/github.com/kiivihal/goharvest/bin/oai_demo/main.go
$ go run $GOPATH/src/github.com/kiivihal/goharvest/bin/oai_harvest_demo1/main.go
$ go run $GOPATH/src/github.com/kiivihal/goharvest/bin/oai_harvest_demo2/main.go
$ go run $GOPATH/src/github.com/kiivihal/goharvest/bin/hello_oai/main.go
$ go run $GOPATH/src/github.com/kiivihal/goharvest/bin/channel_harvest_demo1/main.go

About

OAI harvesting toolkit for golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%