documents

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Copyright 2025 National Technology and Engineering Solutions of Sandia SPDX-License-Identifier: BSD-3-Clause

Copyright 2025 National Technology and Engineering Solutions of Sandia SPDX-License-Identifier: BSD-3-Clause

Copyright 2025 National Technology and Engineering Solutions of Sandia SPDX-License-Identifier: BSD-3-Clause

Copyright 2025 National Technology and Engineering Solutions of Sandia SPDX-License-Identifier: BSD-3-Clause

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PDFPageCount added in v0.3.0

func PDFPageCount(pdf []byte) (int, error)

func PDFSlicePages added in v0.3.0

func PDFSlicePages(pdf []byte, startPage, endPage int) ([]byte, error)

Types

type Bibliography added in v0.3.0

type Bibliography struct {
	PDF       []byte
	Text      string
	StartPage int
	EndPage   int
}

func (*Bibliography) Content added in v0.3.0

func (b *Bibliography) Content() (string, error)

type EntryFromBibliographyExtractor added in v0.3.0

type EntryFromBibliographyExtractor interface {
	// Retrieve bib entry `id` from a prepared bibliography artifact.
	EntryFromBibliography(b *Bibliography, id int) (string, error)
}

type EntryFromRawExtractor

type EntryFromRawExtractor interface {
	// Retrieve bib entry `id` from `b64` base-64 encoded PDF file
	EntryFromRaw(b64 string, id int) (string, error)
}

type MetaExtractor

type MetaExtractor interface {
	PDFMetadata(content []byte) (*Metadata, error)
	HTMLMetadata(content []byte) (*Metadata, error)
}

type Metadata

type Metadata struct {
	Title           string   `json:"title"`
	Authors         []string `json:"authors"`
	PublicationDate string   `json:"publication_date"`
}

func (*Metadata) ToString added in v0.2.0

func (m *Metadata) ToString() string

Jump to

Keyboard shortcuts

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