batch

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ItemSummary

type ItemSummary struct {
	Index             int                `json:"index"`
	Input             string             `json:"input"`
	OutputDir         string             `json:"output_dir"`
	Mode              string             `json:"mode,omitempty"`
	OK                bool               `json:"ok"`
	Status            string             `json:"status"`
	ManifestPath      string             `json:"manifest"`
	MergedMarkdown    string             `json:"merged_markdown"`
	PagesTotal        int                `json:"pages_total"`
	SourcePagesTotal  int                `json:"source_pages_total,omitempty"`
	PagesProcessed    int                `json:"pages_processed,omitempty"`
	PagesRetained     int                `json:"pages_retained,omitempty"`
	PagesSuccess      int                `json:"pages_success"`
	PagesFailed       int                `json:"pages_failed"`
	PagesCached       int                `json:"pages_cached"`
	GroundingWarnings int                `json:"grounding_warnings"`
	Resumed           bool               `json:"resumed,omitempty"`
	Error             *extract.PageError `json:"error,omitempty"`
}

type Options

type Options struct {
	OutputRoot      string
	PromptName      string
	PromptFile      string
	Merge           bool
	Resume          bool
	DryRun          bool
	FileWorkers     int
	Workers         int
	RetryCount      int
	TextGrounding   bool
	Progress        ProgressFunc
	ExtractProgress extract.ProgressFunc
	Render          render.Options
	VLMConfig       vlm.Config
}

type ProgressEvent

type ProgressEvent struct {
	Stage            ProgressStage
	Index            int
	Total            int
	Input            string
	OutputDir        string
	Status           string
	PagesTotal       int
	SourcePagesTotal int
	PagesSuccess     int
	PagesFailed      int
	PagesCached      int
	Duration         time.Duration
	Message          string
}

type ProgressFunc

type ProgressFunc func(ProgressEvent)

type ProgressStage

type ProgressStage string
const (
	ProgressFileStarted   ProgressStage = "file_started"
	ProgressFileCompleted ProgressStage = "file_completed"
)

type Summary

type Summary struct {
	OK                bool          `json:"ok"`
	Command           string        `json:"command"`
	InputDir          string        `json:"input_dir"`
	OutputRoot        string        `json:"output_root"`
	Manifest          string        `json:"manifest"`
	DryRun            bool          `json:"dry_run"`
	FileWorkers       int           `json:"file_workers"`
	FilesTotal        int           `json:"files_total"`
	FilesDone         int           `json:"files_done"`
	FilesFailed       int           `json:"files_failed"`
	GroundingWarnings int           `json:"grounding_warnings"`
	StartedAt         time.Time     `json:"started_at"`
	FinishedAt        time.Time     `json:"finished_at"`
	Items             []ItemSummary `json:"items"`
}

func Run

func Run(ctx context.Context, inputDir string, options Options) (Summary, error)

Jump to

Keyboard shortcuts

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