diff --git a/import2ledger/importers/github.py b/import2ledger/importers/github.py index b0481b3d67dd9a26c6fb9cce307480948f249cba..6ad5a913d5d5f9b50adc76e479ad8189918ebca1 100644 --- a/import2ledger/importers/github.py +++ b/import2ledger/importers/github.py @@ -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), } diff --git a/setup.py b/setup.py index c11865cb835ada05c0521c4b37e0a42354fe7f3f..684cde263968e30c21930e2c2b8dad295f66cab8 100755 --- a/setup.py +++ b/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+',