github: Turn PRIVATE handle into Anonymous.
This commit is contained in:
parent
742fccca0c
commit
1e24bfe304
2 changed files with 6 additions and 2 deletions
|
@ -17,13 +17,17 @@ class SponsorsImporter(_csv.CSVImporterBase):
|
|||
'transaction id': 'transaction_id',
|
||||
}
|
||||
ENTRY_SEED = {'currency': 'USD'}
|
||||
PAYEE_MAP = {
|
||||
'PRIVATE': 'Anonymous',
|
||||
}
|
||||
|
||||
def _read_row(self, row):
|
||||
amount = strparse.currency_decimal(row['processed amount'])
|
||||
if (not amount) or row['status'] != 'settled':
|
||||
return None
|
||||
payee = row.get('sponsor profile name') or row['sponsor handle']
|
||||
return {
|
||||
'amount': amount,
|
||||
'date': strparse.date(row['transaction date'], self.DATE_FMT),
|
||||
'payee': row.get('sponsor profile name') or row['sponsor handle'],
|
||||
'payee': self.PAYEE_MAP.get(payee, payee),
|
||||
}
|
||||
|
|
2
setup.py
2
setup.py
|
@ -30,7 +30,7 @@ REQUIREMENTS['tests_require'] = [
|
|||
setup(
|
||||
name='import2ledger',
|
||||
description="Import different sources of financial data to Ledger",
|
||||
version='1.4.1',
|
||||
version='1.4.2',
|
||||
author='Brett Smith',
|
||||
author_email='brettcsmith@brettcsmith.org',
|
||||
license='GNU AGPLv3+',
|
||||
|
|
Loading…
Reference in a new issue