Unverified Commit c5f1620d authored by Guilhem Saurel's avatar Guilhem Saurel Committed by GitHub
Browse files

Merge pull request #6 from TLasguignes/master

script offices: update of november arrivals and departures
parents 2b9c0ed6 6f810eaa
{
"B181": [
[
"Bury",
"Diane"
],
[
"Fourmy",
"Médéric"
......@@ -67,6 +71,14 @@
[
"Lasguignes",
"Thibaud"
],
[
"Marsan",
"Thibault"
],
[
"Naveau",
"Maximilien"
]
],
"B67": [
......@@ -74,9 +86,21 @@
"Fadini",
"Gabriele"
],
[
"Jallet",
"Wilson"
],
[
"Leziart",
"Pierre-Alexandre"
],
[
"Perrot",
"Côme"
],
[
"Romualdi",
"Giulio"
]
],
"B69.1": [
......@@ -120,11 +144,5 @@
"Mansard",
"Nicolas"
]
],
"BSalleGerardBauzil": [
[
"Sosnowski",
"Vinicius"
]
]
}
\ No newline at end of file
......@@ -84,11 +84,10 @@ class Offices:
# Stuff that is wrong in LDAP… We should fix that there
WRONG_OFFICE = {
'Exterieur': {('Steve', 'Tonneau')},
'B67': {('Michel', 'Aractingi')},
'Exterieur': {('Steve', 'Tonneau'), ('Nils', 'Hareng')},
'B69.1': {('Guilhem', 'Saurel'), ('Pierre', 'Fernbach')},
'B90': {('Nicolas', 'Mansard')},
'B181': {('Bury', 'Diane')},
'B69.2': {('D. V. Thanh', 'Nguyen')},
}
WRONG_OFFICE = {k: {Gepettist(sn, gn) for (gn, sn) in v} for k, v in WRONG_OFFICE.items()}
# Fix unicode from LDAP data…
......@@ -109,7 +108,12 @@ def door_label(members, logo=True):
with Image(filename=LOGO) as logo:
logo.transform(resize=f'{WIDTH}x{HEIGHT}')
draw.composite('over', 200, 0, logo.width, logo.height, logo)
draw.font_size = 80 if len(members) >= 4 else 90
if len(members) > 4:
draw.font_size = 70
elif len(members) == 4:
draw.font_size = 80
else:
draw.font_size = 90
draw.text_alignment = 'center'
height = HEIGHT - len(members) * draw.font_size
draw.text(int(WIDTH / 2), int(height / 2) + 65, '\n'.join(str(m) for m in sorted(members)))
......
Supports Markdown
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