projects
/
money.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3768e5a
)
Corretto importazione.
author
Mauro Scomparin
<scompo@gmail.com>
Wed, 12 Apr 2017 17:06:02 +0000
(19:06 +0200)
committer
Mauro Scomparin
<scompo@gmail.com>
Wed, 12 Apr 2017 17:06:02 +0000
(19:06 +0200)
utils/estrai.py
patch
|
blob
|
blame
|
history
diff --git
a/utils/estrai.py
b/utils/estrai.py
index 27675c84f1b8d58f45b20033477e2e3caea0ba8a..daf919554a29e70bc946674a5deee801b1470d47 100755
(executable)
--- 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