scan

package module
v0.0.0-...-511fc9c Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, pages []api.ExportPage, fileName string) error

func Dir

func Dir(ctx context.Context, dir string, scanCount int) (issues []api.Issue)

Dir scans the given directory for PDF files and extracts episode details from each file. It returns a slice of Episode structs containing the extracted details.

func File

func File(ctx context.Context, fileName string) (api.Issue, error)

File scans the given file in the specified directory and extracts episode details. It returns a slice of Episode structs containing the extracted details and an error if any occurred during the process.

func NewContext

func NewContext(ctx context.Context, appEnv AppEnv) context.Context

NewContext returns a new Context, derived from ctx, which carries the provided config.

func ReadCredits

func ReadCredits(ctx context.Context, fileName string, startingPage int, endingPage int) (api.Credits, error)

func Sanitise

func Sanitise(ctx context.Context, issues *[]api.Issue)

Types

type AppEnv

type AppEnv struct {
	Skip  []string
	Known []string
}

func NewAppEnv

func NewAppEnv() AppEnv

type Suggestion

type Suggestion struct {
	From string
	To   string
	Type SuggestionType
}

type SuggestionType

type SuggestionType int64
const (
	SeriesTitle SuggestionType = iota
	EpisodeTitle
)

Directories

Path Synopsis
internal
pdf

Jump to

Keyboard shortcuts

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