Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transaction ¶ added in v0.0.3
type Transaction struct { Date time.Time `json:"date,omitempty"` Description1 string `json:"description1,omitempty"` Description2 string `json:"description2,omitempty"` Branch string `json:"branch,omitempty"` Change float64 `json:"change,omitempty"` DirectionCr *bool `json:"directionCr,omitempty"` Balance float64 `json:"balance,omitempty"` }
func IngestRow ¶
func IngestRow(prevT *Transaction, row *pdf.Row, year string) (isNew bool, t *Transaction, shouldStopProcessing bool)
a row with a new date signifies a new transaction
as a PDF text row might not be a new transaction, but adds detail to the previous transaction, prevT is added as argument to add transaction detail
the returned isNew tells whether the returned *transaction is a new transaction that should be added to a transaction slice
type Transactions ¶ added in v0.0.3
type Transactions []*Transaction
func ProcessPdfFromBytes ¶
func ProcessPdfFromBytes(b []byte) (Transactions, error)
ProcessPdfFromPath accepts a []byte which will be read and returns an array of transactions resulting from parsing the eStatement PDF.
func ProcessPdfFromPath ¶
func ProcessPdfFromPath(path string) (Transactions, error)
ProcessPdfFromPath reads a local eStatement PDF file and returns an array of transactions resulting from parsing the eStatement PDF.
func ProcessPdfFromReader ¶
func ProcessPdfFromReader(r io.Reader) (Transactions, error)
ProcessPdfFromPath accepts an io.Reader with ReadAll and returns an array of transactions resulting from parsing the eStatement PDF.
func (Transactions) ExportExcel ¶ added in v0.0.3
func (t Transactions) ExportExcel() (f *excelize.File)
ExportExcel exports the transactions into an *excelize.File
The resulting Excel file can be written to file, etc ¶
Reasonable column headers and basic formatting included to ensure the file is easily readable and workable