This commit is contained in:
2020-02-17 18:30:12 +01:00
parent fae35f1ebf
commit 7cb96051a3
4 changed files with 87 additions and 86 deletions

View File

@@ -148,7 +148,9 @@ def write_tasks(people, tasks, file=sys.stdout):
for (d,t) in p.does:
days[d].append((t, t in p.loves, t in p.hates))
q = lambda w: ",".join([t + (" <3" if l else "") + (" :(" if h else "") for (t,l,h) in w])
print("| {} || {} || {} || {} || {} || {} || {}".format(name, *map(q, days), p.vrolijkheid(), p.workload(tasks)), file=file)
days_fmt = " {} ||" * len(days)
days_filled = days_fmt.format(*map(q, days))
print("| {} ||{} {} || {}".format(name, days_filled, p.vrolijkheid(), p.workload(tasks)), file=file)
print("|-")
people = read_people(conf['people'])
with open('prefs_table', 'r') as pref_file: