Skip to content

7heo/GAHTO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GNUCash Account Hierarchy Template Object

GAHTO is a small Python module for creating GNUCash Account Hierarchy Template Objects natively in python, and eventually exporting them in XML as .gnucash-xea files.

Usage

from gahto.gahto import GAHTO
from gahto.gahto import GATO
from gahto.gahto import AccountType

EL = GAHTO("Title")
EL.set_description("Short description", "Longer description")

expenses_acct = GATO("Expenses", AccountType.Expense)
expenses_acct.set_description("Expenses")
expenses_acct.set_placeholder(True)
EL.add_account(expenses_acct)

childcare_acct = GATO("Childcare", AccountType.Expense)
childcare_acct.set_description("Childcare")
expenses_acct.add_subaccount(childcare_acct)

EL.export("example-account-hierarchy.gnucash-xea")

Run tests

With python-coverage and pytest installed, run:

$ python3-coverage run -m pytest
$ python3-coverage html
$ xdg-open htmlcov/index.html

Alternatively, you can replace the last two commands with:

$ python3-coverage report

About

GNUCash Account Hierarchy Template Object

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages