Skip to content

Instantly share code, notes, and snippets.

@peterdemin
Created May 27, 2017 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterdemin/c4c800e3eaceb3ffa6777e000f86b4ef to your computer and use it in GitHub Desktop.
Save peterdemin/c4c800e3eaceb3ffa6777e000f86b4ef to your computer and use it in GitHub Desktop.
Stash aggregation
transform:
- jinja: |
{%- set bofa = stash.bofa_credit | float -%}
{%- set discover = stash.discover | float -%}
{%- set amex = stash.amex | float -%}
{%- set checking = stash.bofa_checking | float -%}
{%- set savings = stash.bofa_savings | float -%}
{%- set credits = bofa + discover + amex -%}
{%- set total = -bofa - discover - amex + checking + savings -%}
```text
checking {{ '%10s' % stash.bofa_checking }}
savings {{ '%10s' % stash.bofa_savings }}
credit cards:
bofa {{ '%10s' % stash.bofa_credit }}
discover {{ '%10s' % stash.discover }}
amex {{ '%10s' % stash.amex }}
*total* {{ '%10s' % credits | dollars }}
-----------------------
balance {{ '%10s' % total | dollars }}
```
- changes: new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment