X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=inline;f=ledger.py;h=f29f73ec190d3b1391b4a3f05ca088607ac221d2;hb=76210b693b77e67bf8160a7fb869ae416309d333;hp=aa295d28203d7279137d9b143b5c236e98c92e31;hpb=8822ee7e3069193162469438bb54ee4629e1ae19;p=misc
diff --git a/ledger.py b/ledger.py
index aa295d2..f29f73e 100755
--- a/ledger.py
+++ b/ledger.py
@@ -15,6 +15,21 @@ class EditableException(PlomException):
super().__init__(*args, **kwargs)
+class LedgerTextLine:
+
+ def __init__(self, text_line):
+ self.text_line = text_line
+ self.comment = ''
+ split_by_comment = text_line.rstrip().split(sep=';', maxsplit=1)
+ self.non_comment = split_by_comment[0].rstrip()
+ self.empty = len(split_by_comment) == 1 and len(self.non_comment) == 0
+ if self.empty:
+ return
+ if len(split_by_comment) == 2:
+ self.comment = split_by_comment[1].lstrip()
+
+
+
# html_head = """
#