goharvest

module
v0.0.0-...-d207067 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2022 License: MIT

README

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

Directories

Path Synopsis
bin
Package oai Data structure for the OAI-PMH protocol request: Data structure for the OAI-PMH protocol responses:
Package oai Data structure for the OAI-PMH protocol request: Data structure for the OAI-PMH protocol responses:
Package protocol defines the golang objects for the OAI protocol It provides objects to harvest items from repository
Package protocol defines the golang objects for the OAI protocol It provides objects to harvest items from repository

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL