Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Parse data source (ofx, qif, csv, etc.) and import to Gnucash file.

Project description

GNUCash Magical Importer

Build Status

Set of scripts to manage my personal finance with gnucash. This project have many parsers to gnucash file. The intent is integrate diferents data sources into gnucash data file.

The gnucash's xml file will act as transaction database. All other reports will be born from Parsers.

Source of Information

  • Nubank credit card
  • Itau's checking account
  • CEF's savings
  • Gnucash mobile (untracked expenses: money in wallet, gifts, etc)
  • Bradesco's savings

Requirements

  • Cronjob to run integrations
  • From any data source, all transactions must be integrate into one file
  • one file with git commits
  • Report of imported files
  • Save gnucash's xml file as regular file instead of binary (compressed) - it can be achived with option file-compression=false in general section of gnucash configuration

Financial Management

Source of transactions

  • Itau Checking Account
  • CEF savings
  • Money in wallet
  • Nubank
  • Bradesco savings

Classifier

Main goal

  • Single transaction

More Complex Operations

  • A transaction that's is part of another big transaction (a buy with stallments)
  • Monthly (recurrent) payment: HAVAN, RCHLO and utilities bill (gas, water, eletricity)

Enviroment

Virtualenv

It can't be used with virtualenv beacause of dependency on python3-gnucash deb package and gnucash itself. So, you'll need install direct in OS with command:

jefferson@nami.jeffersoncampos.eti.br: ~/universal/projects/gnucash/gnucash-magical-importer/ $ pip3 install -r requirements.txt

Configuration File

This project have a setup.cfg file (ini format) that must be installed to app run. The order of search is:

  1. /etc/gnucash-magical-importer/setup.cfg
  2. /usr/local/etc/gnucash-magical-importer/setup.cfg
  3. /usr/etc/gnucash-magical-importer/setup.cfg
  4. ~/.gnucash-magical-importer/setup.cfg

You can still with make target setup-cfg as:

jefferson@nami.jeffersoncampos.eti.br: ~/universal/projects/gnucash/gnucash-magical-importer/ $ make setup-cfg

Also, you can remove file with targt remove-cfg and view content of directories with target show-cfg.

Docker

For dev machine, you can use docker to development. Build docker with

jefferson@nami.jeffersoncampos.eti.br: ~/universal/projects/gnucash/gnucash-magical-importer/ $ sudo docker build -t foguinhoperuca/gnucash_magical_importer . --build-arg USE_APT_PROXY=True --build-arg APT_PROXY=192.168.1.101:8000

or

jefferson@nami.jeffersoncampos.eti.br: ~/universal/projects/gnucash/gnucash-magical-importer/ $ make docker_build

Then, run the tests with:

jefferson@nami.jeffersoncampos.eti.br: ~/universal/projects/gnucash/gnucash-magical-importer/ $ docker run -ti foguinhoperuca/gnucash_magical_importer /bin/sh -c "make test-check"

or

jefferson@nami.jeffersoncampos.eti.br: ~/universal/projects/gnucash/gnucash-magical-importer/ $ make docker_run

Hacking with bdsit-wheel

  1. manually create egg-info bdsit (bdist_egg) and copy it with expected name as gnucash_magical_importer-0.1.0-py3.6.egg-info in directory build/bdsit.linux-x86_64/wheel;
  2. Comment lines in python3 source code: sudo vim /usr/lib/python3.6/email/message.py#558 and #559;
  3. Then, run python3 setup.py sdist bdist_wheel;
  4. finally, revert step 2;

https://github.com/pypa/wheel/blob/master/wheel/bdist_wheel.py

Similar Projects

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gnucash-magical-importer, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size gnucash_magical_importer-0.1.0-py3.6.egg (30.9 kB) File type Egg Python version 3.6 Upload date Hashes View hashes
Filename, size gnucash_magical_importer-0.1.0.tar.gz (12.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page