Pad currency outputs for right alignment
mwarkentin opened this issue · 2 comments
mwarkentin commented
Right aligning the dollar amounts would make it easier to compare the output between different line items at a glance.
Current output
❯ aws-cct --start 2020-08-01 --end 2020-09-01 --service "Amazon Relational Database Service"
+-----------------------------+------------+------------+-----------+
| SERVICE | 2020-08-01 | 2020-09-01 | DELTA |
+-----------------------------+------------+------------+-----------+
| RDS:Multi-AZ-GP2-Storage | $10,364.42 | $10,620.27 | $255.84 |
| USE1-EU-AWS-In-Bytes | $0.00 | $0.00 | $0.00 |
| Multi-AZUsage:db.t2.medium | $92.08 | $53.74 | -$38.34 |
| RDS:GP2-Storage | $5,793.94 | $5,795.74 | $1.79 |
| RDS:Multi-AZ-StorageUsage | $17.73 | $17.66 | -$0.07 |
| InstanceUsage:db.t2.small | $4.84 | $22.68 | $17.84 |
Proposed output
❯ aws-cct --start 2020-08-01 --end 2020-09-01 --service "Amazon Relational Database Service"
+-----------------------------+------------+------------+-----------+
| SERVICE | 2020-08-01 | 2020-09-01 | DELTA |
+-----------------------------+------------+------------+-----------+
| RDS:Multi-AZ-GP2-Storage | $10,364.42 | $10,620.27 | $255.84 |
| USE1-EU-AWS-In-Bytes | $0.00 | $0.00 | $0.00 |
| Multi-AZUsage:db.t2.medium | $92.08 | $53.74 | -$38.34 |
| RDS:GP2-Storage | $5,793.94 | $5,795.74 | $1.79 |
| RDS:Multi-AZ-StorageUsage | $17.73 | $17.66 | -$0.07 |
| InstanceUsage:db.t2.small | $4.84 | $22.68 | $17.84 |
rgoomar commented
From an initial look, it seems like this can be achieved with specifying ColumnConfigs and setting the text.Align there.