-
Notifications
You must be signed in to change notification settings - Fork 39
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
pdfreader only works with the paycheck transaction builder #109
Comments
The pdfreader should be transaction agnostic like the other readers. I think there are perhaps a few things that might be confusing:
You should be able to use it as it is right now just like the other readers apart from the exceptions above. Does that help? @a0js, feel free to weigh in. |
Thanks for you reply @redstreet . For my specific case, I actually only have one final table that needs to be imported as it's a list of transactions from a pdf. The main problem is that the banking transaction builder makes a call to The other issue I had is that I needed a dynamic crop position for each page to captures the tables that I needed (There was multiple transaction tables in the pdf but they all had the same headers). This means I had to override To be able to reuse the
Let me know what you think. I'd be happy to help implement these changes. Also, this may be unrelated to the |
Agreed, done in 3cab851
Makes sense. Reg the multiple vs single tables issue: single_table_readers (like csvreader) are simply instances of multitable readers with a single table. Eventually, csvreader and csv_multitable_reader should me merged. So IMO, it'd be best for the pdfreader continue to support multiple tables, and in your case, you'll simply read the first and only table in a list of length one.
Agree, and I like your refactoring plan, and I'd be happy to review a PR for it. Refactoring like you broke it down is just good software engineering, and that'd be great. However, the genericpdf reader's
Hmm, unfortunately, I've never used importers with Fava and don't know much about it. However, I'd start debugging by git-grepping for that error you saw "Loading import failed with error" in the Fava code base, and seeing how it calls the importer and what it expects. Happy to help as you continue to debug if needed. |
That makes sense. Multiple tables in which the headers are the same (or a split because of a page break) can be combined into one table and tables that have different headers can be treated as extra tables and processed as such by |
I'd be happy to review the refactor also. It certainly could be decomposed to make it more extensible. |
@redstreet @a0js Do either of you have a preference on where the importer example / tests should be placed? I would like to add an example pdf importer that works for transactions. My first thought was to place it under the Would it make more sense to put the example importer and tests under the institution that spawned this use case: |
Yes, that would be the preferred place for importer specific tests.
|
@redstreet @a0js I've submitted a PR for these changes in #113 . Please let me know your thoughts. Also, sorry about the multiple PRs. I had to run the formatters from the quality gate, but the gates didn't re-run when I pushed the additional commit. Not sure what I was doing wrong there. |
I have a need to get the pdfreader to work as a reader to read in transactions. I have an off brand credit card that only exports the transactions on the credit card statement as a pdf and there's no other export option.
The pdfreader was built around reading paychecks, but not investment, banking or other import modules. This seems counter intuitive to the pattern of the readers. The rest of the framework is built around having a reader which is transaction agnostic to read the data and combining it with a transaction builder to process the specific transaction type.
Python isn't my daily driver, but I'm trying to take a stab at correcting this. I'm not entirely sure how this should be structured to correct this. Is there an example of a reader that works with all of the transaction builders?
The text was updated successfully, but these errors were encountered: