-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addition to support multi page invoices #372
Comments
Thanks for the improvement. Wanna make a pull request for it to make it official and make sure all tests are still working? |
Sure ! Thanks |
I think we need some better logic. Consider invoice with something like:
I think that your change would result in pasing all three lines twice. We should probably make looking for starts and ends iterative. You should probably look for a next start after the last found end. |
Would be interesting to see if PR #378 (comment) would accomplish this. Technically one could call the lines parser multiple times. Sorry, bit in a hurry so for now I can't to provide a more detailed answer and tests. |
Implemented |
Thanks for your work on this project, you made my Monday enjoyable.
I would like to return the favour and contribute my code changes over the day based on the missing feature to support multi page invoices. The start / end for lines is only calculated once which makes it impossible to find all line items.
Hence in parser/lines.py I suggest to make a small modification:
This worked for me.
There is some cleaning up to do when you get the lines back, not sure if this belongs in your library but I used:
There are so many combinations possible with regEx (for ex. start can be cond1 | cond2).
Anyway this is quite a useful little gem of a library,
The text was updated successfully, but these errors were encountered: