]> git.rmz.io Git - dotfiles.git/blobdiff - bin/starling.py
nvim: add FPP copyright snippet
[dotfiles.git] / bin / starling.py
index 669cf06f678fd37325b4e0043c891a01e2ac8b6f..471cd1438310ff95f18affb11c8a6083feafbf8b 100755 (executable)
@@ -12,6 +12,8 @@ class FeedError(Exception):
 
 def read_feed_item(i):
     try:
+        if i.get("status", "") == "DECLINED":
+            return
         date = datetime.strptime(i["transactionTime"], "%Y-%m-%dT%H:%M:%S.%fZ")
         amount = i["amount"]["minorUnits"] / 100
         if i["direction"] == "OUT":
@@ -37,6 +39,9 @@ def read_feed_item(i):
 
 if __name__ == "__main__":
     if outformat == "qif":
+        print("!Account")
+        print("NCurrent Accounts:Starling")
+        print("^")
         print("!Type:Bank")
     cnt = 1
     with open(sys.argv[1], 'r') if len(sys.argv) > 1 else sys.stdin as fp: