|
|
@ -102,102 +102,143 @@ def main():
|
|
|
|
<html lang="en">
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
""" + rf"""
|
|
|
|
<title>Data Report</title>
|
|
|
|
<title>{os.path.basename(output_pdf)}</title>
|
|
|
|
|
|
|
|
""" + r"""
|
|
|
|
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
@page {
|
|
|
|
@page {
|
|
|
|
size: Letter;
|
|
|
|
size: Letter;
|
|
|
|
margin: 50px;
|
|
|
|
margin: 50px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
body {
|
|
|
|
font-family: sans-serif;
|
|
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
|
|
font-size: 12pt;
|
|
|
|
font-size: 11pt;
|
|
|
|
line-height: 1.3; /* Slightly tighter than 1.4 */
|
|
|
|
line-height: 1.5;
|
|
|
|
margin: 0;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
color: #2c3e50;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.trainee-page {
|
|
|
|
.trainee-page {
|
|
|
|
margin-bottom: 1em;
|
|
|
|
margin-bottom: 2em;
|
|
|
|
page-break-after: always; /* Force new page for each trainee */
|
|
|
|
page-break-after: always;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
h1 {
|
|
|
|
font-size: 16pt;
|
|
|
|
font-size: 18pt;
|
|
|
|
margin: 0 0 0.3em 0; /* reduced bottom margin */
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
|
|
|
|
color: #1a365d;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
h2 {
|
|
|
|
font-size: 14pt;
|
|
|
|
font-size: 14pt;
|
|
|
|
margin: 0 0 0.7em 0; /* reduced bottom margin */
|
|
|
|
margin: 0 0 1em 0;
|
|
|
|
|
|
|
|
color: #4a5568;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* General paragraph spacing reduced */
|
|
|
|
|
|
|
|
p {
|
|
|
|
p {
|
|
|
|
margin: 0.2em 0; /* Very small vertical margin */
|
|
|
|
margin: 0.5em 0;
|
|
|
|
white-space: pre-wrap; /* preserve any line breaks from the data */
|
|
|
|
white-space: pre-wrap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comments-label {
|
|
|
|
.comments-label {
|
|
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
|
|
margin-top: 1em;
|
|
|
|
|
|
|
|
margin-bottom: 0.2em;
|
|
|
|
|
|
|
|
color: #7c3aed;
|
|
|
|
|
|
|
|
font-size: 10.5pt;
|
|
|
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
|
|
|
letter-spacing: 0.5px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.comments-value {
|
|
|
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
|
|
|
margin-bottom: 1em;
|
|
|
|
|
|
|
|
color: #6c757d;
|
|
|
|
font-style: italic;
|
|
|
|
font-style: italic;
|
|
|
|
margin-top: 0.4em; /* smaller gap before comments label */
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bold {
|
|
|
|
.bold {
|
|
|
|
font-weight: bold;
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
|
|
color: #2d3748;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.italic {
|
|
|
|
|
|
|
|
font-style: italic;
|
|
|
|
.evaluation-header {
|
|
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
|
|
margin: 1em 0 0.5em 0;
|
|
|
|
|
|
|
|
color: #2d3748;
|
|
|
|
|
|
|
|
font-size: 11pt;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.evaluation-item {
|
|
|
|
|
|
|
|
margin: 0.2em 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.inline-answer {
|
|
|
|
.evaluation-item .bold {
|
|
|
|
margin-top: 0.4em; /* smaller top margin */
|
|
|
|
color: #1a365d;
|
|
|
|
margin-bottom: 0.4em; /* smaller bottom margin */
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
|
|
min-width: 110px;
|
|
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
font-size: 10.5pt;
|
|
|
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
|
|
|
letter-spacing: 0.3px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.block-label {
|
|
|
|
.block-label {
|
|
|
|
font-weight: bold;
|
|
|
|
font-weight: bold;
|
|
|
|
margin-top: 0.4em; /* smaller top margin */
|
|
|
|
margin-top: 1em;
|
|
|
|
margin-bottom: 0.1em; /* smaller bottom margin */
|
|
|
|
margin-bottom: 0.3em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.block-value {
|
|
|
|
.block-value {
|
|
|
|
margin-left: 1em;
|
|
|
|
margin-bottom: 0.5em;
|
|
|
|
margin-bottom: 0.2em; /* smaller bottom margin */
|
|
|
|
color: #4a5568;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.entry-value {
|
|
|
|
|
|
|
|
color: #059669;
|
|
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
|
|
font-size: 12pt;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% for row in rows %}
|
|
|
|
<body>
|
|
|
|
<div class="trainee-page">
|
|
|
|
{% for row in rows %}
|
|
|
|
<!-- Name first -->
|
|
|
|
<div class="trainee-page">
|
|
|
|
<h1>{{ row.name }}</h1>
|
|
|
|
<h1>{{ row.name }}</h1>
|
|
|
|
|
|
|
|
<h2>Sending Locality: {{ row.locality }}</h2>
|
|
|
|
<!-- Locality second -->
|
|
|
|
|
|
|
|
<h2>Sending Locality: {{ row.locality }}</h2>
|
|
|
|
{% for entry in row.entries %}
|
|
|
|
|
|
|
|
{% if entry.type == "comments" %}
|
|
|
|
{% for entry in row.entries %}
|
|
|
|
<p class="comments-label">Comments:</p>
|
|
|
|
{% if entry.type == "comments" %}
|
|
|
|
<p class="comments-value">{{ entry.value }}</p>
|
|
|
|
<!-- Comments label in italic, value in normal font -->
|
|
|
|
|
|
|
|
<p class="comments-label">Comments:</p>
|
|
|
|
{% elif entry.type == "inline" %}
|
|
|
|
<p>{{ entry.value }}</p>
|
|
|
|
<div class="inline-answer">
|
|
|
|
|
|
|
|
{% if "Truth" in entry.label %}
|
|
|
|
{% elif entry.type == "inline" %}
|
|
|
|
<p class="evaluation-header">Please evaluate your progress for this past term (1-5, 5 indicating the most progress):</p>
|
|
|
|
<!-- Numeric: label + value on one line -->
|
|
|
|
<p class="evaluation-item"><span class="bold">Truth:</span> <span class="entry-value">{{ entry.value }}</span></p>
|
|
|
|
<p class="inline-answer">
|
|
|
|
{% elif "Life" in entry.label %}
|
|
|
|
<span class="bold">{{ entry.label }}</span> {{ entry.value }}
|
|
|
|
<p class="evaluation-item"><span class="bold">Life:</span> <span class="entry-value">{{ entry.value }}</span></p>
|
|
|
|
</p>
|
|
|
|
{% elif "Gospel" in entry.label %}
|
|
|
|
|
|
|
|
<p class="evaluation-item"><span class="bold">Gospel:</span> <span class="entry-value">{{ entry.value }}</span></p>
|
|
|
|
{% else %}
|
|
|
|
{% elif "Character" in entry.label %}
|
|
|
|
<!-- label on one line, value on next -->
|
|
|
|
<p class="evaluation-item"><span class="bold">Character:</span> <span class="entry-value">{{ entry.value }}</span></p>
|
|
|
|
<p class="block-label">{{ entry.label }}</p>
|
|
|
|
{% elif "Service" in entry.label %}
|
|
|
|
<p class="block-value">{{ entry.value }}</p>
|
|
|
|
<p class="evaluation-item"><span class="bold">Service:</span> <span class="entry-value">{{ entry.value }}</span></p>
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
<span class="bold">{{ entry.label }}</span>
|
|
|
|
|
|
|
|
<p class="entry-value">{{ entry.value }}</p>
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
<p class="block-label">{{ entry.label }}</p>
|
|
|
|
|
|
|
|
<p class="comments-value block-value">{{ entry.value }}</p>
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
</html>
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|