// Command pdfamount walks a Documents folder, downloads matching PDFs and // extracts the payable amount, printing "file_id\ttitle\tamount". // // Usage: pdfamount [TITLE_FILTER_REGEX] package main import ( "bytes" "context" "fmt" "os" "os/exec" "regexp" "strconv" "strings" "time" onlyoffice "github.com/eslider/go-onlyoffice" ) // amountPat is the amount capture shared by every amount regex. const amountPat = `([0-9]+(?:[.,][0-9]+)*)` // amountRE builds "