2020-04-05 22:46:22 +02:00
|
|
|
from PIL import Image, ImageDraw, ImageFont
|
|
|
|
import sys
|
|
|
|
|
2020-04-07 14:05:00 +02:00
|
|
|
address = "".join(sys.stdin.readlines())
|
2020-04-05 22:46:22 +02:00
|
|
|
|
2020-04-10 16:11:21 +02:00
|
|
|
img = Image.new('RGB', (696, 220), color = (255, 255, 255))
|
2020-04-05 22:46:22 +02:00
|
|
|
|
2020-04-10 16:11:21 +02:00
|
|
|
fnt0 = ImageFont.truetype('fonts/OpenSans-Regular.ttf', 24)
|
|
|
|
fnt = ImageFont.truetype('fonts/OpenSans-Regular.ttf', 54)
|
2020-04-05 22:46:22 +02:00
|
|
|
d = ImageDraw.Draw(img)
|
2020-04-10 16:11:21 +02:00
|
|
|
d.text((20,5), "Netz39 e.V., Leibnizstr. 32, 39104 Magdeburg", font=fnt0, fill=(0,0,0))
|
2020-04-05 22:46:22 +02:00
|
|
|
d.text((20,25), address.strip('\"'), font=fnt, fill=(0, 0, 0))
|
|
|
|
|
2020-04-07 14:24:52 +02:00
|
|
|
img.save('address-label.png')
|