Skip to content

CLI tool to convert Wise transactions into Beancount format with multi-currency

Notifications You must be signed in to change notification settings

fdavies93/seneca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buy Me A Coffee

Seneca

A script to import from Wise (formerly Transferwise) CSVs to beancount format. Named after Seneca the Younger, a stoic philosopher who became wealthy by pioneering commodities trading and finance. I.e. a Wise Beancounter.

The script can successfully log multi-legged outbound transactions including currency transfers. I use it for my own small business accounting needs.

Imports from Wise Transfers CSV format. Note that this is a relatively new format and doesn't include card transactions before 2023-10-27. For that you'll need to use the older and less rich Wise Statement format, which this tool doesn't support as of 2024-02-28.

If you'd like me to support additional formats, add more options, or notice any errors, please file an issue and consider buying me a coffee.

The project is open for pull requests.

Quickstart

Git clone this repo and navigate to the folder.

python3 -m venv venv
. ./venv/bin/activate
pip install -r requirements.txt 
python seneca.py --input wise_transactions.csv --map categories.json

Options

Note that the script prints to stdout. This is by design so that you can use > and >> to pipe into different files.

--input

The Wise transactions CSV file to import from. E.g. input/business-wise.csv

--map

A JSON file. This lets you automatically set the category of both inbound and outbound transactions to this account, which is very helpful when processing a large number of transactions. It uses the target_name and source_name columns from the Wise CSV as the key and your desired category as the key. For example:

{
  "Spotify": "Expenses:Subscriptions",
  "Acme Corp": "Income:Salary"
}

If there's no category found then the script will allocate Income:Unassigned or Expenses:Unassigned to your transactions.

--sort

A switch to decide the order in which transactions are sorted, by date. If the value is desc, outputs in descending order (most recent date first). For all other values, and by default, outputs in ascending order by date.

python seneca.py -i input/transactions.csv --sort desc

About

CLI tool to convert Wise transactions into Beancount format with multi-currency

Topics

Resources

Stars

Watchers

Forks