leonhandreke/turboolaf — Issue #1: Alignment breaks when lines are too long
Author: lorenzhs
Created: 2012-01-09 10:00:21+00:00
State: open

In case descriptions become too long (as is the case in product 23 / "Wiesentahler Sprudel (blau)", the pretty 40 characters width goes boom. Example session:

Welcome to TurboOlaf!
{'24': {'price': 3.5, 'name': 'Wiesentahler Sprudel (grün)'}, '25': {'price': 4.8, 'name': 'Wiesentahler Zitronensprudel'}, '26': {'price': 4.8, 'name': 'Wiesentahler Orange'}, '27': {'price': 6.0, 'name': 'Wiesentahler Grapefruitlimo'}, '20': {'price': 11.5, 'name': 'Granini Banane'}, '21': {'price': 14.0, 'name': 'Granini Kirsche'}, '22': {'price': 13.4, 'name': 'Granini Maracuja'}, '23': {'price': 3.5, 'name': 'Wiesentahler Sprudel (blau)'}, '28': {'price': 6.2, 'name': 'Wiesentahler Apfelschorle'}, '29': {'price': 5.5, 'name': 'Wiesentahler ColaMix'}, '1': {'price': 15.5, 'name': 'Becks 24/0,3'}, '3': {'price': 15.5, 'name': 'Hoepfner Grape Active 24/0.3'}, '2': {'price': 15.5, 'name': 'Hoepfner Grape 24/0.3'}, '5': {'price': 15, 'name': 'Maisel Weizen 20/0.5'}, '4': {'price': 15, 'name': 'Hoepfner Kräusen 20/0.5'}, '7': {'price': 52.0, 'name': 'Rothaus Pils 30l'}, '6': {'price': 13.5, 'name': 'Tannenzäpfle24/0.3'}, '9': {'price': 11.5, 'name': 'Coca-Cola 12/1'}, '8': {'price': 13.0, 'name': 'Coca-Cola 10/1.5'}, '11': {'price': 8.0, 'name': 'Kumpf Apfel Direkt'}, '10': {'price': 13.0, 'name': 'Fanta Orange 10/1'}, '13': {'price': 9.0, 'name': 'Kumpf Orange Gold'}, '12': {'price': 9.75, 'name': 'Kumpf Multi'}, '15': {'price': 7.0, 'name': 'Neus Apfel'}, '14': {'price': 8.0, 'name': 'Kumpf Orange PET'}, '17': {'price': 10.0, 'name': 'Neus Orange'}, '16': {'price': 9.0, 'name': 'Neus Multi'}, '19': {'price': 13.5, 'name': 'Granini Ananas'}, '18': {'price': 11.0, 'name': 'Neus Kirsche'}, '31': {'price': 6.5, 'name': 'Orangen alt'}, '30': {'price': 4.7, 'name': 'Apfel alt'}}
Product code:23
Product code:8
Product code:6
Product code:6
Product code:
****************************************
K1 Getränkeverkauf
09 Jan 2012 10:55:38
ID: 1326102903
****************************************

Wiesentahler Sprudel (blau) 3.5 x 1 = 3.5
Tannenzäpfle24/0.3 13.5 x 2 = 27.0
Coca-Cola 10/1.5 13.0 x 1 = 13.0
----------------------------------------
Total: 43.5