Changeset - 1e24bfe30455
[Not reviewed]
0 2 0
Brett Smith - 3 years ago 2020-12-18 15:35:50
brettcsmith@brettcsmith.org
github: Turn PRIVATE handle into Anonymous.
2 files changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
import2ledger/importers/github.py
Show inline comments
...
 
@@ -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),
 
        }
setup.py
Show inline comments
...
 
@@ -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+',
0 comments (0 inline, 0 general)