Commit 4c189b5c authored by Lorenz Steinert's avatar Lorenz Steinert

nicer code

parent 6fa2a4ab
......@@ -84,13 +84,13 @@ def gen_head(share_dir, reg, sprecher, protokollant, date):
return f_head
def resort_fsr(fsr, num_cols=5):
fsr += [""] * (num_cols - len(fsr)%num_cols)
depth = len(fsr)//num_cols
fsr += [""] * (num_cols - len(fsr) % num_cols)
depth = len(fsr) // num_cols
tmp = [[] for i in range(depth)]
for index, elem in zip(range(len(fsr)), fsr):
tmp[index%depth] += [elem]
tmp[index % depth] += [elem]
return [j for i in tmp for j in i]
......@@ -99,7 +99,7 @@ def gen_attendance_tab(fsr, num_cols=5, ext=False):
fsr = resort_fsr(fsr, num_cols)
tabdef = '||' + 'c|l||'*num_cols
tabdef = '||' + 'c|l||' * num_cols
fsr_tab = ''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment