The renaming function reads the PDF and extracts variables for the renaming.
build binary with:
go get -d -v ./... && go build buchhaltung.go
Move all PDF invoices to a directory. At the moment we only support pure PDFs and not scans.
Create a json config file like:
[
{
"outputname": "{number}_{company}.pdf",
"identifyers": {
"number": "Belegnummer\\s+(WF\\d{11})",
"company": "(weinfreunde)"
}
},
{
"outputname": "{number}_{company}.pdf",
"identifyers": {
"number": "Rechnungsnr.:\\s+(F\\d{11})",
"company": "(klarmobil)"
}
}
]
And run buchhaltung:
buchhaltung invoice -i /Users/test/bills -o /Users/test/bills/output -c /Users/test/
config_example.json