-
Notifications
You must be signed in to change notification settings - Fork 16
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
Enhanced parsing functionality #50
Open
flywire
wants to merge
16
commits into
marlanperumal:develop
Choose a base branch
from
flywire:cba
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+360
−33
Open
Changes from 6 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
506ae00
Add parsing options
flywire 177fd13
Extended cba json config file
flywire b3fe25e
Draft tests for extended functionality
flywire 271df28
csv date_format='%d/%m/%y'
flywire 315c6ff
Remove debug code
flywire 3d600f5
Layout for no text-based header
flywire da397e0
citi cheque.json
flywire e97cd9d
clean_truncate removes misidentified trailing data
flywire 72840a6
pandas_options
flywire 44c948f
Process date_format "%d %b" with no year
flywire 83fae2b
json truncate removes misidentified trailing data
flywire 31b5ad9
pandas_options not required in json
flywire 18a56cb
test_clean_case
flywire f8231f8
test_clean_prestrip
flywire 1e65da1
Explicit returns on all functions
flywire 6fcd0ac
tests clean_date clean_dropna reorder_columns
flywire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/marlanperumal/pdf_statement_reader/develop/pdf_statement_reader/config/psr_config.schema.json", | ||
"//": "Describe layout for pages to be scanned", | ||
"layout": { | ||
"//": "Default layout for all pages not otherwise defined", | ||
"default": { | ||
"//": "Page coordinates containing table in pts", | ||
"//": "[top, left, bottom, right]", | ||
"area": [143, 58, 760, 546], | ||
"//": "Right x coordinate of each column in table", | ||
"columns": [93, 344, 402, 460, 546] | ||
}, | ||
"//": "Layout for first page", | ||
"first": { | ||
"area": [385, 58, 760, 546], | ||
"columns": [93, 344, 402, 460, 546] | ||
} | ||
}, | ||
|
||
"//": "Statement column names exactly as they appear", | ||
"columns": { | ||
"trans_date": "Date", | ||
"trans_detail": "Transaction", | ||
"debit": "Debit", | ||
"credit": "Credit", | ||
"balance": "Balance" | ||
}, | ||
|
||
"//": "csv column output order", | ||
"order": [ | ||
"trans_date", | ||
"trans_detail", | ||
"debit", | ||
"credit", | ||
"balance" | ||
], | ||
|
||
"//": "Specify required cleaning operations", | ||
"cleaning": { | ||
"//": "Remove key column transactions using value", | ||
"prestrip": ["trans_detail", "(?i)(^Balance.*Forward$)|(Closing Balance)"], | ||
"//": "Convert these columns to numeric", | ||
"numeric": ["debit", "credit", "balance"], | ||
"//": "Convert these columns to date", | ||
"date": ["trans_date"], | ||
"//": "Use this date format to parse any date columns", | ||
"date_format": "%d %b", | ||
"trans_detail": "below", | ||
"//": "Key column and value column to unwrap", | ||
"unwrap": ["trans_date", "trans_detail"], | ||
"//": "Change to Title Case", | ||
"case": ["trans_detail"], | ||
"//": "Only keep the rows where these columns are populated", | ||
"dropna": ["trans_date"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest json config support optional second date format for output