-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkhour-report-generator.py
579 lines (516 loc) · 31.2 KB
/
workhour-report-generator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
#!/usr/bin/env python3
# coding: utf8
"""
Workhour-report-generator.py
A Workhour report generator.
@licence: GNU GENERAL PUBLIC LICENSE
@author: Timo Osterkamp
@contact: [email protected]
@version: 1.0 (1/2017)
Thanks to Benjamin Graf ([email protected])
"""
import argparse
from calendar import Calendar
from math import ceil
from time import *
import random
import subprocess
import os
try:
from yattag import Doc, indent
except ImportError:
print('The "yattag" package is missing, install with python-pip:')
print(' $ sudo python3 -m pip install yattag')
exit(1)
try:
import holidays
except ImportError:
print('The "holidays" package is missing, install with python-pip:')
print(' $ sudo python3 -m pip install holidays')
exit(1)
UNI_LOGO = ''.join([
"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2Jl"
"IElsbHVzdHJhdG9yIDEyLjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAg"
"QnVpbGQgNTE0NDgpICAtLT4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEv"
"L0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiBbCgk8"
"IUVOVElUWSBuc19zdmcgImh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTwhRU5USVRZIG5zX3hs"
"aW5rICJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KXT4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlk"
"PSJMYXll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MuNzQyLDU3Ny4zNzUsMjEwMS44MTMsNTg5LjQyMywy"
"MTA0LjAwNiw1NzUuMTg2TDIxMDQuMDA2LDU3NS4xODZ6Ii8+CjwvZz4KPC9zdmc+"
])
def days_of_month(year, month):
calendar = Calendar()
dates = calendar.itermonthdates(year, month)
def is_in_correct_month(date):
return date.month == month
return list(filter(is_in_correct_month, dates))
def is_workday(date):
return date.weekday() < 5 and date not in holidays.DE(state='NI', years=date.year)
#def is_in_working_day_range(date, first, last):
# return date.day >= first and date.day >= last
def random_distribution(days, hours, **kwargs):
"""
Args:
days (list): List of dates.
hours (int): Number of hours to distribute.
Kwargs:
min_hours_per_day (int): Minimum number of hours per day.
"""
min_h_per_day = kwargs.get('min_hours_per_day', 4)
num_days_required = ceil(hours / min_h_per_day)
print(len(days))
print(num_days_required)
selected_days = sorted(random.sample(days, num_days_required))
day_to_hours = {}
for day in selected_days:
assigned_hours = min(min_h_per_day, hours)
day_to_hours[day] = assigned_hours
hours -= assigned_hours
return [(day, day_to_hours.get(day, 0)) for day in days]
def getDay(day, month, year):
timestamp = mktime((year, month, day, 0, 0, 0, 0, 0, 0))
lt = localtime(timestamp)
monat = strftime('%a',lt)
if monat == 'Mon':
monat = 'Mo'
elif monat == 'Tue':
monat = 'Di'
elif monat == 'Wed':
monat = 'Mi'
elif monat == 'Thu':
monat = 'Do'
elif monat == 'Fri':
monat = 'Fr'
elif monat == 'Sat':
monat = 'Sa'
elif monat == 'Sun':
monat = 'So'
datum = strftime('., %d.%m.%Y', localtime(timestamp))
return monat + datum
def default_tabulation(days_and_hours, monat, jahr):
args = read_args
table = []
for day, hours in days_and_hours:
if hours == 0:
row = {'day': getDay(day.day,monat,jahr), 'begin': None, 'end': None, 'pause': None,
'duration': None, 'noted': None}
else:
pause = 1 if hours > 4 else 0
row = {
'day': getDay(day.day,monat,jahr),
'begin': 8,
'end': 8 + hours + pause,
'pause': pause,
'duration': hours,
'noted': day
}
table.append(row)
return table
def read_args():
opts = argparse.ArgumentParser(description='Create workhour reports.')
opts.add_argument('firstname', metavar='FIRSTNAME', type=str,
help='your first name')
opts.add_argument('lastname', metavar='LASTNAME', type=str,
help='your last name')
opts.add_argument('hours', metavar='HOURS', type=int,
help='number of actual working hours in this month')
opts.add_argument('year', metavar='YEAR', type=int,
help='which Year')
opts.add_argument('month', metavar='MONTH', type=int,
help='which month')
opts.add_argument('--first', dest='first', type=int,
default=1, help='earliest working day of the month')
opts.add_argument('--last', dest='last', type=int,
default=31, help='latest working day of the month')
opts.add_argument('--monthly', dest='monthly', type=int,
help='number of monthly working hours of your contract, '
'if different to your actual hours in this month')
opts.add_argument('--institution', dest='institution', type=str,
default='FB Mathematik/Informatik, Institut für Informatik',
help='the institute where you work')
opts.add_argument('--signature', dest='signature', type=str,
default='', help='path and filename of signature picture')
args = opts.parse_args()
if not args.monthly:
args.monthly = args.hours
return args
def main():
lt = localtime()
jahr, monat, tag = lt[0:3]
datum = '%02i.%02i.%04i' % (tag, monat, jahr)
args = read_args()
days = days_of_month(args.year, args.month)
def is_in_working_day_range(date):
return date.day >= args.first and date.day <= args.last
days_in_range = list(filter(is_in_working_day_range, days))
workdays = list(filter(is_workday, days_in_range))
# Distribute hours onto the days
used_days = random_distribution(workdays, args.hours)
# Merge assigned days and non-workdays
day_to_hours = {day: hours for day, hours in used_days}
days_and_hours = [(day, day_to_hours.get(day, 0)) for day in days]
# Make output table
table = default_tabulation(days_and_hours, args.month, args.year)
# Generate html output
def val2str(val):
return "" if val is None else val
def hours2string(hours):
return "" if hours is None else '{:02d}:00'.format(hours)
column_heads = [
'Kalendartag',
'Beginn (Uhrzeit)',
'Pause (Dauer)',
'Ende (Uhrzeit)',
'Dauer (Summe)',
'aufgezeichnet am',
'Bemerkung'
]
doc, tag, text = Doc().tagtext()
with tag('html'):
with tag('head'):
doc.asis('<meta charset="utf-8">')
with tag('style'):
doc.asis("""
body { font-size:9pt; }
table { width:100%; }
.dates { border-collapse:collapse; }
.dates td { border:1pt solid black; padding:3pt; }
.formhead { width:40%; padding-right:10pt; }
.formval { border-bottom:1pt solid black; }
.sig { border-top:1pt solid black; width:45%; vertical-align:top; }
td { font-size:9pt; }
""")
with tag('body'):
doc.stag('br')
doc.stag('br')
doc.stag('br')
doc.stag('img', src='data:image/svg+xml;base64,{}'.format(UNI_LOGO),
style='width:150pt;')
with tag('h2'):
text('Erfassung der geleisteten Arbeitszeiten')
with tag('table'):
with tag('tr'):
with tag('td', klass='formhead'):
text('Name, Vorname der Hilfskraft')
with tag('td', klass='formval'):
text(args.lastname, ', ', args.firstname)
with tag('tr'):
with tag('td', klass='formhead'):
text('Fachbereich / Organisationseinheit')
with tag('td', klass='formval'):
text(args.institution)
with tag('tr'):
with tag('td', klass='formhead'):
text('Monat / Jahr')
with tag('td', klass='formval'):
text(args.month, ' / ', args.year)
with tag('tr'):
with tag('td', klass='formhead'):
text('Monatsarbeitszeit laut Arbeitsvertrag')
with tag('td', klass='formval'):
text(args.monthly, 'h')
for _ in range(3): doc.stag('br')
with tag('table', klass='dates'):
with tag('tr'):
for column_head in column_heads[:-1]:
with tag('td'):
text(column_head)
with tag('td', style='width:30%;'):
text(column_heads[-1])
for row in table:
with tag('tr'):
with tag('td'):
text(val2str(row['day']))
with tag('td'):
text(hours2string(row['begin']))
with tag('td'):
text(hours2string(row['pause']))
with tag('td'):
text(hours2string(row['end']))
with tag('td'):
text(hours2string(row['duration']))
with tag('td'):
text(str(row['noted'] or ""))
with tag('td'):
pass
# Sum row
with tag('tr'):
with tag('td'):
with tag('strong'):
text('Summe')
for _ in range(3):
with tag('td'):
pass
with tag('td'):
text(hours2string(args.hours))
for _ in range(2):
with tag('td'):
pass
for _ in range(5): doc.stag('br')
with tag('table'):
with tag('tr'):
with tag('td'):
text(datum)
if args.signature != '':
sig = ''
if args.signature[0] == '/':
sig = args.signature
else:
sig = os.path.dirname(os.path.abspath(__file__)) + '/' + args.signature
print(sig)
doc.stag('img', src='{}'.format(sig), style='width:150pt;')
with tag('td'):
pass
with tag('tr'):
with tag('td', klass='sig'):
text('Datum, Unterschrift der Hilfskraft')
with tag('td'):
pass
with tag('td', klass='sig'):
text('Datum, Unterschrift der Leiterin / des Leiters der OE')
doc.stag('br')
text('alternativ: Vorgesetzte / Vorgesetzter')
# Generate report..
report_filename = '{}-{:04d}-{:02d}.pdf'.format(
args.lastname.lower(),
args.year,
args.month
)
proc = subprocess.Popen(['wkhtmltopdf', '-', '--enable-local-file-access', report_filename], stdin=subprocess.PIPE)
proc.communicate(input=bytes(doc.getvalue(), encoding='utf-8'))
if proc.returncode != 0:
print('Some error occurred during report generation :(')
exit(1)
else:
print('Report written to "{}"'.format(report_filename))
if __name__ == '__main__':
main()