Skip to content

renevanderark/goharvest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goharvest

OAI-PMH harvester implementations for golang.

Hello OAI

package main

import (
	"github.com/renevanderark/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/renevanderark
$ cd github.com/renevanderark
$ git clone https://github.com/renevanderark/goharvest.git

Starting the demo's:

$ go run $GOPATH/src/github.com/renevanderark/goharvest/bin/oai_demo/main.go
$ go run $GOPATH/src/github.com/renevanderark/goharvest/bin/oai_harvest_demo1/main.go
$ go run $GOPATH/src/github.com/renevanderark/goharvest/bin/oai_harvest_demo2/main.go
$ go run $GOPATH/src/github.com/renevanderark/goharvest/bin/hello_oai/main.go
$ go run $GOPATH/src/github.com/renevanderark/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