pdf2csvcli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitSuccess = 0
	ExitFailure = 1
)

Variables

This section is empty.

Functions

func ExtractorFactory

func ExtractorFactory(bankType BankType) (pdfcardsummaryio.Extractor, error)

ExtractorFactory creates a new PDF card summary extractor based on the bank type.

func Run

func Run(rawArgs []string, stderr io.Writer) int

Run executes the CLI logic and writes user-facing failures to stderr.

Types

type Args

type Args struct {
	Bank    BankType `arg:"-b,--bank,required" help:"Bank type (santander or visa-prisma)"`
	PDFs    []string `arg:"positional,required" help:"List of PDF files to parse"`
	JoinCSV *string  `` /* 224-byte string literal not displayed */
}

Args defines the command line arguments.

func ParseArgs

func ParseArgs(rawArgs []string) (Args, error)

ParseArgs parses the command line arguments. It is usually called passing os.Args[1:].

func (Args) Validate

func (a Args) Validate() error

type BankType

type BankType string

BankType is a custom type to represent the bank enum.

var (
	Santander  BankType = "santander"
	VisaPrisma BankType = "visa-prisma"
)

Jump to

Keyboard shortcuts

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