metroconv

Metro Bank CSV to FreeAgent CSV converter


License
MIT
Install
pip install metroconv==1.0b1

Documentation

Metro Bank CSV to FreeAgent CSV converter

The Problem

FreeAgent supports multiple well documented formats for importing bank account transactions into the accounting system. Metro Bank however only provides for download their own CSV format or force you to use their partner accounting systems to interface with your Business Bank Accounts.

I tried contactig Metro about it and request support for something like the QIF format but no joy there.

The Solution

This tiny piece of software tries to mitigate this by converting from the CSV format Metro Bank provides to the CSV format FreeAgent accepts.

The CSV format Metro uses

Date,Reference,Transaction Type,Money In, Money Out,Balance
21/01/2019,17 JAN 19 MCDONALDS SOUTHEND ON S GBR,Card Purchase,0.00,6.79,3250.05

The CSV format FreeAgent needs

21/01/2019,-6.79,17 JAN 19 MCDONALDS SOUTHEND ON S GBR

Bonus round: Metro Breaks their own format when it comes to their fees as there is no reference

28/01/2019,,Account Maintenance Fee,0.00,5.00,3100.70

Building it

This piece of software is Python 3 compatible and also runs fine on Windows/mac/linux. It comes with a small utility that uses the code provided in the metroconv library. Once installed into a python environment the tool metroconv will be available on the PATH assuming the python environment, in which it is installed is the main python on the system or a python virtual environment that is activated.

Build using setup.py

You can do

python setup.py bdist_egg

or if you have the wheel packager installed

python setup.py bdist_wheel

after which there will be an installation artefact in the dist directory that looks like one of these:

30/01/2019  15:01             3,563 metroconv-1.0-py3-none-any.whl
30/01/2019  15:01             7,170 metroconv-1.0-py3.7.egg

Then any of the 2 can be used by pip to install it.

pip install metroconv-1.0-py3-none-any.whl

Processing metroconv-1.0-py3-none-any.whl
Installing collected packages: metroconv
Successfully installed metroconv-1.0

Installing from pypi (if it ever gets in there)

pip install metroconv

Using it

Assuming it is installed you can run

metroconv "Transaction_30.01.2019.csv"
INFO:metroconv.scripts.main:Writing output_file: ...Transaction_30.01.2019_conv.csv