SergelsOrg / csv2tex

Tool to replace placeholders in tex-files
GNU General Public License v3.0
5 stars 0 forks source link

days/hours absent #58

Closed DonMischo closed 2 years ago

DonMischo commented 2 years ago

absence days and hours need to be added for base data

ArchibaldBienetre commented 2 years ago

Ok, easy enough to fix, these could simply be more "positional parameters" (i.e., fixed columns at the beginning of the CSV).

But let's focus on the MVP first.

ArchibaldBienetre commented 2 years ago

Placeholders to implement:

ArchibaldBienetre commented 2 years ago

Starting this now :mag:

ArchibaldBienetre commented 2 years ago

Turns out, branch is already prepared, PR was created today: https://github.com/SergelsOrg/csv2tex/pull/71

ArchibaldBienetre commented 2 years ago

Placeholders to implement:

  • #absenceDays
  • #absenceHours
  • #absenceDaysUnauthorized
  • #absenceHoursUnauthorized

You know what? This seems like the less ambiguous choice:

    private static final String TEX_TEMPLATE_PLACEHOLDER_ABSENCE_DAYS_TOTAL = "#absenceDaysTotal";
    private static final String TEX_TEMPLATE_PLACEHOLDER_ABSENCE_DAYS_UNAUTHORIZED = "#absenceDaysUnauthorized";
    private static final String TEX_TEMPLATE_PLACEHOLDER_ABSENCE_HOURS_TOTAL = "#absenceHoursTotal";
    private static final String TEX_TEMPLATE_PLACEHOLDER_ABSENCE_HOURS_UNAUTHORIZED = "#absenceHoursUnauthorized";
ArchibaldBienetre commented 2 years ago

...

A bit tricky, currently, because, for example, #48 is not done yet. For the smoke test, I first have to install the missing packages.

Also, statements like \input{SchoolReportTemplate_ZeugnisTemplate_Commands.tex} need to be replaced with absolute paths, as we run the PDF transformation in a temporary directory, currently, to avoid side effects in the codebase, and because texi2pdf does not allow specifying an output file. But we can work around that

ArchibaldBienetre commented 2 years ago

:arrow_up: Moving this task to a separate issue

The rest is fixed, yippie! :)