usawa

Signed, immutable accounting.
Log | Files | Refs | Submodules | LICENSE

commit 3e82c6fd431a268be755270576cbcc51ff8fbdce
parent b342d04ed3ea6d14021c9e99ba6b5ba79292979d
Author: lash <dev@holbrook.no>
Date:   Sat, 28 Mar 2026 22:05:08 -0600

Implement tags for entry

Diffstat:
Mdummy/usawa/entry.py | 4++--
Mdummy/usawa/tag.py | 4++++
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dummy/usawa/entry.py b/dummy/usawa/entry.py @@ -214,11 +214,11 @@ class Entry(UsawaElement): @staticmethod - def empty(tx_date=None, ref=None, description=None, parent=None, tx_datereg=None, unitindex=None): + def empty(tx_date=None, ref=None, description=None, parent=None, tx_datereg=None, unitindex=None, tags=None): if not tx_date: tx_date = datetime.datetime.utcnow() logg.debug('txdate is {}'.format(tx_date)) - return Entry(-1, tx_date, ref=ref, description=description, parent=parent, tx_datereg=tx_datereg, unitindex=unitindex) + return Entry(-1, tx_date, ref=ref, description=description, parent=parent, tx_datereg=tx_datereg, unitindex=unitindex, tags=tags) """Add an entry part to the entry. diff --git a/dummy/usawa/tag.py b/dummy/usawa/tag.py @@ -13,6 +13,10 @@ class Tags: self.store.put_tag(tag, description) + def remove(self, tag): + del(self.tags[tag]) + + def to_list(self): return list(self.tags.keys())