version 1.5, 2020/11/14 22:15:56 |
version 1.8, 2020/11/26 19:39:43 |
Line 42 is exactly one of |
|
Line 42 is exactly one of |
|
.Pp |
.Pp |
.Bl -bullet -offset indent -compact |
.Bl -bullet -offset indent -compact |
.It |
.It |
|
.Cm bbva_usa |
|
.It |
.Cm capital_one_credit |
.Cm capital_one_credit |
.It |
.It |
.Cm chase_credit |
.Cm chase_credit |
.It |
.It |
.Cm optum_hsa |
.Cm optum_hsa |
|
.It |
|
.Cm sparkasse_camt |
|
.It |
|
.Cm wellsfargo |
.El |
.El |
.Pp |
.Pp |
and corresponds to an existing |
and corresponds to an existing |
.Pa import_ Ns Ar accountname Ns Pa .txt |
.Pa ./import/ Ns Ar accountname Ns Pa .txt |
configuration file in the current directory. |
configuration file. |
.Ss Configuration file format |
.Ss Configuration file format |
Each file of the form |
Each configuration file contains rules |
.Pa import_ Ns Ar accountname Ns Pa .txt |
used to import transactions from a financial institution. |
in the current directory is a configuration file used to |
|
import transactions from a financial institution. |
|
Like all |
Like all |
.Xr pta 1 |
.Xr pta 1 |
input files, it is an |
input files, it is an |
Line 66 as the field delimiter and using the hash character |
|
Line 70 as the field delimiter and using the hash character |
|
.Pq Sq # |
.Pq Sq # |
in the first column to mark lines as ignored. |
in the first column to mark lines as ignored. |
.Pp |
.Pp |
Each file contains one line beginning with |
The rules are as follows: |
.Qq ACCOUNT |
.Bl -tag -width Ds |
and is followed by whitespace and then an account number. |
.It Ic ACCOUNT Ar csv_account_number |
.Pp |
The number in |
Each file contains lines of the form |
.Xr pta-accounts 5 |
.Pp |
of the bank or credit card account this CSV file contains entries for. |
.Ar selector account_number booking_identifier |
This rule is required in every configuration file. |
.Pp |
.It Ic DELIM Ar delimiter |
The |
The character used to separate fields. |
|
This rule is required in every configuration file. |
|
Most financial institutions use commas but some use semicolons. |
|
.It Ic HEADER Ar header |
|
Skip the first line of the CSV file if it matches the |
|
.Ar header |
|
line verbatim, or cause parsing to fail if it does not. |
|
.It Ic IGNORE Ar regular_expression |
|
Skip all lines in the CSV file matching the |
|
.Ar regular_expression . |
|
.It Ic QUOTE Ar quote |
|
Expects that every field starts and ends with the |
|
.Ar quote |
|
character. |
|
.It Ar selector account_number booking_identifier |
|
Lines in the CSV file that match the |
.Ar selector |
.Ar selector |
is a string consisting of regular expressions |
are associated with the contra account |
separated by commas. |
|
Its fields correspond to header fields in the financial |
|
institution's CSV file and is used to classify transactions |
|
that match the search pattern. |
|
The first selector that |
|
matches a transaction wins. |
|
.Pp |
|
The |
|
.Ar account_number |
.Ar account_number |
corresponds to an account number in |
and are assigned the |
.Pa ./accounts.txt . |
.Ar booking_identifier . |
The |
The selector is a string consisting of regular expressions separated |
.Ar booking_identifier |
by delimiters defined in the |
is defined by the user to classify |
.Ic DELIM |
the transaction. |
rule. |
|
.El |
.Sh FILES |
.Sh FILES |
.Bl -tag -width Ds -compact |
.Bl -tag -width Ds -compact |
.It Pa ./import_capital_one_credit.txt |
.It Pa ./import/bbva_usa.txt |
.It Pa ./import_chase_credit.txt |
.It Pa ./import/capital_one_credit.txt |
.It Pa ./import_optum_hsa.txt |
.It Pa ./import/chase_credit.txt |
|
.It Pa ./import/sparkasse_camt.txt |
|
.It Pa ./import/optum_hsa.txt |
|
.It Pa ./import/wellsfargo.txt |
.El |
.El |
.Pp |
.Pp |
These files contain the header that the financial institution uses, the |
These files contain the header that the financial institution uses, the |
|
|
.Dl ,,,Automotive,,, 1111 AUTO |
.Dl ,,,Automotive,,, 1111 AUTO |
.Pp |
.Pp |
is a sample entry in the |
is a sample entry in the |
.Pa ./import_chase_credit.txt |
.Pa ./import/chase_credit.txt |
file which uses headers of the form |
file which uses headers of the form |
.Pp |
.Pp |
.Dl Transaction Date,Post Date,Description,Category,Type,Amount |
.Dl Transaction Date,Post Date,Description,Category,Type,Amount |
|
|
.Dl "10/26/2020,10/26/2020,example.com*asldfkj,Shopping,Sale,-17.07" |
.Dl "10/26/2020,10/26/2020,example.com*asldfkj,Shopping,Sale,-17.07" |
.Pp |
.Pp |
and |
and |
.Pa ./import_chase_credit.txt |
.Pa ./import/chase_credit.txt |
contains |
contains |
.Bd -literal -offset Ds |
.Bd -literal -offset Ds |
ACCOUNT 3234 |
ACCOUNT 3234 |
Line 216 Transaction Date,Post Date,Description,Category,Type,A |
|
Line 231 Transaction Date,Post Date,Description,Category,Type,A |
|
.Ed |
.Ed |
.Pp |
.Pp |
and |
and |
.Pa ./import_chase_credit.txt |
.Pa ./import/chase_credit.txt |
is given by |
is given by |
.Bd -literal |
.Bd -literal |
# Chase credit card header is |
# Chase credit card header is |
Line 272 has the following limitations: |
|
Line 287 has the following limitations: |
|
.Bl -dash |
.Bl -dash |
.It |
.It |
Pattern recognition in the |
Pattern recognition in the |
.Pa import_accountname.txt |
.Pa import/accountname.txt |
files is under continued development. |
files is under continued development. |
.It |
.It |
The only defined import formats are for Chase credit cards, |
Only CSV files for these account types are supported: |
Capital One credit cards, and Optum Health Savings Accounts. |
.Bl -bullet -offset indent -compact |
|
.It |
|
.Cm BBVA USA bank accounts |
|
.It |
|
.Cm Capital One credit cards |
|
.It |
|
.Cm Chase credit cards |
|
.It |
|
.Cm Optum HSA bank accounts |
|
.It |
|
.Cm Sparkasse bank accounts |
|
.It |
|
.Cm Wells Fargo bank accounts |
|
.El |
.El |
.El |