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
...
 
@@ -14,16 +14,20 @@ class SponsorsImporter(_csv.CSVImporterBase):
 
        'sponsor handle': 'handle',
 
        # 'sponsor profile name': 'name',
 
        'sponsor email': 'email',
 
        '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
...
 
@@ -27,13 +27,13 @@ REQUIREMENTS['tests_require'] = [
 
    *all_extras_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+',
 

	
 
    packages=find_packages(include=['import2ledger', 'import2ledger.*']),
 
    entry_points={
0 comments (0 inline, 0 general)