Skip to content

Conversation

@rmilecki
Copy link
Collaborator

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

import invoice2data

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

@rmilecki
Copy link
Collaborator Author

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.

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

import invoice2data

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

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
@m3nu
Copy link
Collaborator

m3nu commented Feb 19, 2023

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
Copy link
Collaborator

m3nu commented Feb 19, 2023

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

Copy link
Collaborator

@bosd bosd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! :+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants