workflow

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: BSD-3-Clause Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

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 FormatAnalysis

func FormatAnalysis(result *lookup.Result) string

Types

type Counter

type Counter interface {
	CountBibliographyEntries(*documents.Bibliography) (int, error)
}

type EntryState

type EntryState struct {
	ID             string
	TextStatus     string
	Text           string
	AnalysisStatus string
	LookupCards    []LookupCard
	Summary        SummaryView
	Error          string
}

type Keys

type Keys struct {
	ShirtyAPIKey     string
	ShirtyBaseURL    string
	OpenRouterAPIKey string
}

type LookupCard added in v0.3.2

type LookupCard struct {
	Name   string
	Status string
	Detail string
}

func BuildLookupCards added in v0.3.2

func BuildLookupCards(result *lookup.Result) []LookupCard

type Options

type Options struct {
	Entry   int
	Workers int
}

type Progress

type Progress func(State)

type Provider

type Provider interface {
	PrepareBibliographyContent([]byte) (*documents.Bibliography, error)
	EntryFromBibliography(*documents.Bibliography, int) (string, error)
	entries.Classifier
	entries.Parser
	documents.MetaExtractor
	Summarize(*lookup.Result) (bool, string, error)
}

type ProviderKind

type ProviderKind string
const (
	ProviderNone       ProviderKind = ""
	ProviderShirty     ProviderKind = "Shirty"
	ProviderOpenRouter ProviderKind = "OpenRouter"
)

type Runtime

type Runtime struct {
	Kind           ProviderKind
	Provider       Provider
	Counter        Counter
	CrossrefClient *crossref.Client
	ArxivClient    *arxiv.Client
}

func NewRuntime

func NewRuntime(keys Keys) (*Runtime, error)

type State

type State struct {
	Provider  ProviderKind
	Phase     string
	Total     int
	Completed int
	Entries   []EntryState
	Error     string
}

func AnalyzePDF

func AnalyzePDF(ctx context.Context, rt *Runtime, pdf []byte, progress Progress) State

func AnalyzePDFWithOptions

func AnalyzePDFWithOptions(ctx context.Context, rt *Runtime, pdf []byte, options Options, progress Progress) State

type SummaryView added in v0.3.2

type SummaryView struct {
	Status  string
	Comment string
}

func BuildSummaryView added in v0.3.2

func BuildSummaryView(result *lookup.Result) SummaryView

Jump to

Keyboard shortcuts

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