From: Mauro Scomparin Date: Wed, 12 Apr 2017 17:06:02 +0000 (+0200) Subject: Corretto importazione. X-Git-Url: https://git.scompo.it/?a=commitdiff_plain;h=36bb2a25cb7c3e6727ce60715655e97a65e9eef7;p=money.git Corretto importazione. --- diff --git a/utils/estrai.py b/utils/estrai.py index 27675c8..daf9195 100755 --- a/utils/estrai.py +++ b/utils/estrai.py @@ -4,13 +4,12 @@ dati = [] stato = 0 with open('dati.quif','r') as f: for l in f: - if stato == 0 and '!Type:Cash' in l: + if stato == 0 and l.startswith('D'): stato = 1 tr = { - 'head' : l + 'head' : l } dati.append(tr) - elif stato == 1 and l.startswith('D'): dati[-1]['data'] = l elif stato == 1 and l.startswith('M'): dati[-1]['descrizione'] = l