Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added skip to mapping api to allow rows to be skipped. Skip Yodlee sp…

…lit lines
  • Loading branch information...
commit bde24ba822460a1f0a833ef54cbad9289d505e47 1 parent d75bafa
@djmuhlestein authored
Showing with 5 additions and 1 deletion.
  1. +3 −1 src/csv2ofx/__init__.py
  2. +2 −0  src/csv2ofx/mappings.py
View
4 src/csv2ofx/__init__.py
@@ -173,7 +173,9 @@ def OnExport(self,evt):
accounts={}
today = datetime.now().strftime('%Y%m%d')
for row in range(self.grid_table.GetNumberRows()):
- # which account
+ # which account
+ if mapping['skip'](row,grid): continue
+
uacct="%s-%s" % (mapping['BANKID'](row,grid), mapping['ACCTID'](row,grid))
acct = accounts.setdefault(uacct,{})
View
2  src/csv2ofx/mappings.py
@@ -32,6 +32,7 @@ def toOFXDate(date):
return datetime.strptime(date,'%m/%d/%y').strftime('%Y%m%d')
yodlee = {
+ 'skip':lambda row,grid: fromCSVCol(row,grid,'Split Type') == 'Split',
'BANKID':lambda row,grid: fromCSVCol(row,grid,'Account Name').split(' - ')[0],
'ACCTID':lambda row,grid: fromCSVCol(row,grid,'Account Name').split(' - ')[-1],
'DTPOSTED':lambda row,grid: toOFXDate(fromCSVCol(row,grid,'Date')),
@@ -44,6 +45,7 @@ def toOFXDate(date):
}
cu = {
+ 'skip':lambda row,grid: False,
'BANKID':lambda row,grid: 'Credit Union',
'ACCTID':lambda row,grid: 'My Account',
'DTPOSTED':lambda row,grid: toOFXDate(fromCSVCol(row,grid,'Date')),

0 comments on commit bde24ba

Please sign in to comment.
Something went wrong with that request. Please try again.