aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 11:30:41 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 11:30:41 +0200
commit4a40378f58160212c0c1c42552a1301e3a498037 (patch)
tree9c4870b5beb5d68808622fca785c1cb2235fea0f /scripts
parentb4917434488d03164be15cd1f6a02ab7f570ba13 (diff)
update time2tex format
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/time2tex.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/scripts/time2tex.py b/scripts/time2tex.py
index a5d6802..f3f8de9 100755
--- a/scripts/time2tex.py
+++ b/scripts/time2tex.py
@@ -11,7 +11,7 @@ def fmt_duration(sec):
hour = mins // 60
if hour > 0:
- out.append("%02dh" % (hour, ))
+ out.append("%dh" % (hour, ))
mins = mins % 60
out.append("%02dm" % (mins, ))
@@ -91,16 +91,13 @@ def fmt_weekly_overview(times):
return tex.env('table', tex.join(
tex.cmd('centering'),
tex.cmd('fitimg',
- tex.env('tabular', r'l' + r'r@{~}l' * len(members) + r'@{\qquad}r', tex.join(
+ tex.env('tabular', r'l' + r'r@{~}l' * len(members) + r'>{\quad}r', tex.join(
tex.cmd('toprule'),
- tex.tabrule(*[
- tex.cmd('textbf', cell)
- for cell in [
- tex.esc("#"),
- *tex.explist([ member, "" ] for member in members),
- "Subtotal",
- ]
- ]),
+ tex.tabrule(
+ tex.cmd("textbf", tex.esc("#")),
+ *[tex.cmd("multicolumn", "2", "c", tex.cmd("textbf", member)) for member in members],
+ tex.cmd("textbf", "Subtotal"),
+ ),
tex.cmd('midrule'),
*[
tex.tabrule(*[