invoice2data icon indicating copy to clipboard operation
invoice2data copied to clipboard

Provide Invoice2Data class for object oriented usage

Open rmilecki opened this issue 2 years ago • 3 comments

This will allow using invoice2data in an object oriented way like:

import invoice2data

i2d = invoice2data.Invoice2Data()
i2d.extract_data("foo.pdf")

rmilecki avatar Feb 19 '23 16:02 rmilecki

I was wondering if there is any interest in providing an Invoice2Data class so this project can be used as a library in an object oriented way.

That idea originally came from #392 but maybe it could be a generic improvement.

rmilecki avatar Feb 19 '23 16:02 rmilecki

Sounds good. So the class would be instantiated with some templates and then read invoices? Makes sense, since we already keep some state via templates and the input source.

m3nu avatar Feb 19 '23 19:02 m3nu

I'd still carefully consider which objects make sense. Maybe you also want an Invoice class to hold the read invoice.

m3nu avatar Feb 19 '23 19:02 m3nu