|
42 | 42 | completion_progress.append((language, completion)) |
43 | 43 | print(completion_progress[-1]) |
44 | 44 |
|
45 | | -template = Template( |
46 | | - """<html lang="en"> |
47 | | - <head> |
48 | | - <title>Python Docs Translation Dashboard</title> |
49 | | - <link rel="stylesheet" href="style.css"> |
50 | | - </head> |
51 | | - <body> |
52 | | - <h1>Python Docs Translation Dashboard</h1> |
53 | | - <table> |
54 | | - <thead> |
55 | | - <tr><th>language</th><th>completion</th></tr> |
56 | | - </thead> |
57 | | - <tbody> |
58 | | - {% for language, completion in completion_progress | sort(attribute=1) | reverse %} |
59 | | - <tr> |
60 | | - <td data-label="language">{{ language }}</td> |
61 | | - <td data-label="completion"> |
62 | | - <div class="progress-bar" style="width: {{ completion | round(2) }}%;">{{ completion | round(2) }}%</div> |
63 | | - </td> |
64 | | - </tr> |
65 | | - {% endfor %} |
66 | | - </tbody> |
67 | | - </table> |
68 | | - <p>Last updated at {{ generation_time.strftime('%A, %d %B %Y, %X %Z') }}.</p> |
69 | | - </body> |
70 | | - </html>""" |
71 | | -) |
| 45 | +template = Template("""<html lang="en"> |
| 46 | +<head> |
| 47 | + <title>Python Docs Translation Dashboard</title> |
| 48 | + <link rel="stylesheet" href="style.css"> |
| 49 | +</head> |
| 50 | +<body> |
| 51 | +<h1>Python Docs Translation Dashboard</h1> |
| 52 | +<table> |
| 53 | +<thead> |
| 54 | +<tr><th>language</th><th>completion</th></tr> |
| 55 | +</thead> |
| 56 | +<tbody> |
| 57 | +{% for language, completion in completion_progress | sort(attribute=1) | reverse %} |
| 58 | +<tr> |
| 59 | + <td data-label="language">{{ language }}</td> |
| 60 | + <td data-label="completion"> |
| 61 | + <div class="progress-bar" style="width: {{ completion | round(2) }}%;">{{ completion | round(2) }}%</div> |
| 62 | + </td> |
| 63 | +</tr> |
| 64 | +{% endfor %} |
| 65 | +</tbody> |
| 66 | +</table> |
| 67 | +<p>Last updated at {{ generation_time.strftime('%A, %d %B %Y, %X %Z') }}.</p> |
| 68 | +</body> |
| 69 | +</html>""") |
72 | 70 |
|
73 | 71 | output = template.render(completion_progress=completion_progress, generation_time=generation_time) |
74 | 72 |
|
|
0 commit comments