Git Product home page Git Product logo

qif-split's Introduction

QIF Split

Travis CI Status

Splits transactions in a QIF file to support budgeting and more granular financial tracking.

Installation

$ mkvirtualenv --python=python3 qif-split # optional
$ pip install --requirement requirements.txt
$ python setup.py test install

Usage

$ qif-split --help
QIF Split

Usage:
  qif-split split --qif-input=<PATH> [--split-cfg=<PATH>] [--asof=<DATE>] [--verbose]
  qif-split -h | --help
  qif-split --version

Options:
  --qif-input=<PATH>   Input QIF file.
  --split-cfg=<PATH>   Input configuration of splits [Default: ./split-config.json]
  --asof=<DATE>        Only process splits for transactions on or after this date (e.g.: %Y-%m-%d).
  -h --help            Show this screen.
  --version            Show version.
  --verbose            Debug-level output.

Example

Overview

In order to illustrate how you might use qif-split to automate maintaining a budget in GnuCash, take this budgeting scenario described in the blog post "Better budgeting with GnuCash". This scenario involves splitting transactions to allocate them properly to budget contra-accounts.

By using the qif-split tool when importing transactions from QIF files downloaded from your bank, you can eliminate the tedious & error-prone work of manually splitting transactions to keep your budget updated.

Illustration

The file allmybrain-input.qif provides a QIF file consisting of the two transactions described in that blog post:

!Account
NAssets:Current Assets:Checking Account
TBank
^
!Type:Bank
C
D12/15/2008
NN/A
PSample Income
T100.00
LIncome
^
C
D12/16/2008
NN/A
PGrocery Shopping
T-37.50
LExpenses:Food
^

By running qif-split on that input, we get a new QIF file with the transactions split so that the amounts get properly allocated to the configured budget account:

$ qif-split split \
    --qif-input=eg/allmybrain-input.qif \
    --split-cfg=eg/allmybrain-split-config.json
!Account
NAssets:Current Assets:Checking Account
TBank
^
!Type:Bank
D12/15/2008
NN/A
T100.00
PSample Income
LIncome
SBudget:Food
$50.00
SAssets:Budgeted Cash
$-50.00
SIncome
$100.00
^
D12/16/2008
NN/A
T-37.50
PGrocery Shopping
LExpenses:Food
SAssets:Budgeted Cash
$37.50
SBudget:Food
$-37.50
SExpenses:Food
$-37.50
^

Importing the resulting split QIF file into the provided GnuCash file (eg/allmybrain.gnucash) gives the desired result of the transactions split properly across budget accounts:

Journal view of imported QIF file with splits.

qif-split's People

Contributors

ebridges avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

qif-split's Issues

QIF file with no transactions results in zero-byte file

Given the below, well formed QIF file results in a split file with zero bytes. Given the below input, should output a well formed QIF file.

!Account
NLiabilities:Credit Cards:creditcard-business-1275
TCCard
^
!Type:CCard
^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.