Revision 191a474b
Added by david.sorber over 6 years ago
| software/misc/generate_rows.py | ||
|---|---|---|
|
# https://baranovich.homelinux.org:3268/schedule.html
|
||
|
|
||
|
PAYMENT_AMOUNT = 500
|
||
|
ROW_TEMPLATE = '<tr{:s}>\n <td class="align-center">{:d}</td>'\
|
||
|
ROW_TEMPLATE = ' <tr{:s}>\n <td class="align-center">{:d}</td>'\
|
||
|
'<td class="align-center">{:s}</td>'\
|
||
|
'<td class="align-right">{:s}</td>'\
|
||
|
'<td class="align-right">{:s}</td>'\
|
||
|
'<td class="align-right">{:s}</td>'\
|
||
|
'<td>{:s}</td>\n</tr>'
|
||
|
'<td>{:s}</td>\n </tr>'
|
||
|
|
||
|
def main():
|
||
|
num_rows = 94
|
||
|
row_idx = 1
|
||
|
month_idx = 10
|
||
|
year_idx = 2018
|
||
|
principal = 47000
|
||
|
num_rows = 75
|
||
|
row_idx = 20
|
||
|
month_idx = 5
|
||
|
year_idx = 2020
|
||
|
principal = 37000
|
||
|
|
||
|
for idx in range(num_rows):
|
||
|
row = ((idx % 2 == 1) and ' class="even_row"' or '',
|
||
|
row = ((row_idx % 2 == 0) and ' class="even_row"' or '',
|
||
|
row_idx,
|
||
|
'{:02d}/{:d}'.format(month_idx, year_idx),
|
||
|
'${:,.2f}'.format(PAYMENT_AMOUNT),
|
||
Update generate rows script for repayment schedule.