From 5a4aaea8daed76bd4193f78076f1c40932a0e295 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Tue, 7 Apr 2020 14:05:00 +0200 Subject: [PATCH] now compatible with jq -r output --- README.md | 2 ++ address-label.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 566990e..522c08c 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,6 @@ ```bash 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 ``` \ No newline at end of file diff --git a/address-label.py b/address-label.py index 1db7652..29e3014 100644 --- a/address-label.py +++ b/address-label.py @@ -1,7 +1,7 @@ from PIL import Image, ImageDraw, ImageFont import sys -address = sys.stdin.readline() +address = "".join(sys.stdin.readlines()) img = Image.new('RGB', (696, 160), color = (255, 255, 255))