Help us shape the future of Go! Take the 2026 Go Developer Survey

internal

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_OUTPUT_DIR = "Downloads"
	PDF_EXTENSION      = ".pdf"
)

Variables

This section is empty.

Functions

func DefaultDir

func DefaultDir() (string, error)

func EnsurePDFExtension

func EnsurePDFExtension(name string) string

func HomeDir

func HomeDir() (string, error)

func ResolveInputDir

func ResolveInputDir(baseDir string, name string) (string, error)

Types

type Merge

type Merge struct {
	InputFiles []string
	OutputFile string
	// contains filtered or unexported fields
}

func NewMerge

func NewMerge(engine engine.Engine, inputFiles []string, outputFile string) *Merge

func (*Merge) All

func (m *Merge) All(ctx context.Context, divider bool) error

type PageRange

type PageRange struct {
	// contains filtered or unexported fields
}

func ChunkRanges

func ChunkRanges(totalPages int, chunkSize int) ([]PageRange, error)

func NewPageRange

func NewPageRange(from int, to int) (*PageRange, error)

func ParseRanges

func ParseRanges(s string, total int) ([]PageRange, error)

func UniqueRanges

func UniqueRanges(ranges []PageRange) []PageRange

func (*PageRange) From

func (r *PageRange) From() int

func (*PageRange) String

func (r *PageRange) String() string

func (*PageRange) To

func (r *PageRange) To() int

type Split

type Split struct {
	InputFile     string
	OutputDirName string
	// contains filtered or unexported fields
}

func NewSplit

func NewSplit(engine engine.Engine, inputFile string, outputDirName string) *Split

func (*Split) EveryNPages

func (s *Split) EveryNPages(ctx context.Context, n int) ([]string, error)

func (*Split) Ranges

func (s *Split) Ranges(ctx context.Context, ranges []PageRange, combine bool) ([]string, error)

func (*Split) RangesFromSpecification

func (s *Split) RangesFromSpecification(ctx context.Context, specification string, combine bool) ([]string, error)

Jump to

Keyboard shortcuts

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