Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

leighmcculloch/clippercard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clippercard

Tools and packages relating to Clipper card.

Apps/Tools

clippercardcsv (cli)

Convert a Clipper card transaction history PDF to CSV.

Install

Linux, macOS, Windows

Download and install the binary from the releases page.

macOS
brew install 4d63/clippercard/clippercardcsv
Source
go get 4d63.com/clippercard/transactionhistory/apps/cmd/clippercardcsv

Usage

Usage of clippercardcsv:

Examples:
  clippercardcsv ridehistory.pdf
  clippercardcsv ridehistory.pdf > ridehistory.csv
  cat ridehistory.pdf | clippercardcsv > ridehistory.csv

Flags:
  -filter-weekdays string
        Weekdays to filter by, only transactions occurring on these weekdays will be included in the CSV (default "monday,tuesday,wednesday,thursday,friday,saturday,sunday")
  -headings
        Include headings on columns (default true)
  -help
        Print this help
  -version
        Print version

Packages

transactionhistory

import "4d63.com/clippercard/transactionhistory/pdf"
transactionHistory, err := pdf.Parse(file)
if err != nil {
	// error parsing
}

for _, t := range transactionHistory.Transactions {
	// do things with transactions
}