Skip to content

A simple parser for Japanese credit card statements, to easily import them into Actual.

License

Notifications You must be signed in to change notification settings

KarboniteKream/actual-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

actual-parser

A simple parser for Saison Card and SMBC credit card statements, to easily import them into Actual.

Usage

To use this script, download a CSV file from one of the supported sites, and run the following:

./actual-parser.py my-statement.csv

The output will be in CSV format, which can be imported into Actual:

"Date","Payee","Notes","Category","Amount"
"2024-12-01","GitHub","Sponsors","Donations","-500"
"2024-12-02","Open Collective","Actual","Donations","-1000"

Configuration

Transactions can be transformed using the mapping files under the data directory. All files are simple JSON mappings between the payee name and the target value.

Once the transaction is identified using exact or prefix matching on the payee name, the desired field is replaced using the target value.

For example, the payee.json file can contain the following object:

{
    "GITHUB": "GitHub"
}

In this case, the payee field of any transaction with the payee GITHUB or GITHUB.COM will be changed to GitHub.

The same works for the notes.json file:

{
    "GOOGLE*GSUITE": "G Suite"
}

In this case, the notes field of any transaction with the payee GOOGLE*GSUITE will be changed to G Suite.

Notes

To avoid committing changes to the data directory, run the following:

git update-index --skip-worktree data/*.json

About

A simple parser for Japanese credit card statements, to easily import them into Actual.

Topics

Resources

License

Stars

Watchers

Forks

Languages