now compatible with jq -r output

This commit is contained in:
David Kilias 2020-04-07 14:05:00 +02:00
parent 126b124593
commit 5a4aaea8da
2 changed files with 3 additions and 1 deletions

View file

@ -2,4 +2,6 @@
```bash ```bash
echo "Max Hackerberg\nLeibnizstr. 32\n39104 Magdeburg" | python address-label.py echo "Max Hackerberg\nLeibnizstr. 32\n39104 Magdeburg" | python address-label.py
jq -r .stammdaten.address_label ../Vorstand/stammdaten-formular/example.json | python address-label.py
``` ```

View file

@ -1,7 +1,7 @@
from PIL import Image, ImageDraw, ImageFont from PIL import Image, ImageDraw, ImageFont
import sys import sys
address = sys.stdin.readline() address = "".join(sys.stdin.readlines())
img = Image.new('RGB', (696, 160), color = (255, 255, 255)) img = Image.new('RGB', (696, 160), color = (255, 255, 255))