gollico: github.com/nicomo/gollico Index | Files

package gollico

import "github.com/nicomo/gollico"

Package gollico provIDes functions for the APIs provIDed by the Bibliothèque Nationale de France on top of its Gallica digital library see http://api.bnf.fr/api-iiif-de-recuperation-des-images-de-gallica

Package gollico provides functions for the APIs provided by the Bibliothèque Nationale de France on top of its Gallica digital library


Package Files

iiif-manifest.go iiif.go shared.go toc.go


const (
    BaseURL     = "http://gallica.bnf.fr/services/"
    BaseURLIIIF = "http://gallica.bnf.fr/iiif/ark:/12148/"

BaseURL for the gallica APIs

func GetIIIFDocMetadata Uses

func GetIIIFDocMetadata(ark string) ([]byte, error)

GetIIIFDocMetadata returns the Metadata for a document

func GetToc Uses

func GetToc(ark string) ([]byte, error)

GetToc retrieves the Table of Content for a document returns it as json

type IIIFDoc Uses

type IIIFDoc struct {
    ID           string
    Label        string
    Attribution  string
    License      string
    Related      string
    Description  string
    IIIFMetadata IIIFMetadata
    Images       []Image
    Thumbnail    string

IIIFDoc is a complete document returned by the IIIF API

func GetIIIFDoc Uses

func GetIIIFDoc(ark string) (IIIFDoc, error)

GetIIIFDoc retrieves a document struct from the API

func (IIIFDoc) GetCoverThumbnail Uses

func (iDoc IIIFDoc) GetCoverThumbnail() string

GetCoverThumbnail retrieves the thumbnail for the cover of a document

func (IIIFDoc) GetImage Uses

func (iDoc IIIFDoc) GetImage(p Params) ([]byte, error)

GetImage retrieves an image from the IIIF Server

func (IIIFDoc) GetImagesData Uses

func (iDoc IIIFDoc) GetImagesData() ([]byte, error)

GetImagesData retrieves the data for all the images in a document

func (IIIFDoc) GetThumbnails Uses

func (iDoc IIIFDoc) GetThumbnails() []string

GetThumbnails retrieves the thumbnails for all the images in a document

func (IIIFDoc) ImagesCount Uses

func (iDoc IIIFDoc) ImagesCount() int

ImagesCount returns the number of images in a document

type IIIFMetadata Uses

type IIIFMetadata struct {
    Repository     string
    Provider       string
    Disseminator   string
    SourceImages   string
    MetadataSource string
    Shelfmark      string
    Title          string
    Date           string
    Language       []string
    Format         []string
    Creator        string
    Relation       string
    Type           map[string][]string

IIIFMetadata is the embedded Metadata struct of a document

type Image Uses

type Image struct {
    ID        string
    Label     string
    Height    float64
    Width     float64
    Format    string
    Thumbnail string

Image is the embedded image in a document

type Params Uses

type Params struct {
    Ark      string
    PageID   string
    RegionX  int
    RegionY  int
    Width    int
    Height   int
    Size     int
    Rotation int
    Quality  string
    Format   string

Params struct with info to pass to IIIF server required fields : Ark, PageID other fields have default values if sent as nil

type Toc Uses

type Toc struct {
    TocEntries []TocEntry

Toc stores the Table of Content for a document

type TocEntry Uses

type TocEntry struct {
    Text string
    Href []href

TocEntry stores an entry in a Table of Content

Package gollico imports 10 packages (graph). Updated 2018-03-13. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).