From 72ef23de26e60df4762b7d8a9c1840053bc1835b Mon Sep 17 00:00:00 2001 From: almelid Date: Wed, 29 Sep 2010 19:50:52 +0000 Subject: [PATCH] =?UTF-8?q?Search-person=20skal=20n=C3=A5=20fungere.=20Hur?= =?UTF-8?q?ra!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/worblehat.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/worblehat.py b/python/worblehat.py index 4f4a560..e08d3fc 100755 --- a/python/worblehat.py +++ b/python/worblehat.py @@ -42,12 +42,12 @@ def remove_duplicates(list): return d.keys() def search_person_cmd(search_strings, search_description=False): - people = search_people(search_strings, search_description) - format = '%-30s %-10s %-60s' + people = search_person(search_strings, search_description) + format = '%-20s %-10s %-70s' for person in people: - name = cut_str(person.first_name+' '+person.last_name, 30) + name = cut_str(person.first_name+' '+person.last_name, 20) p_id = cut_str(person.id, 10) - books = cut_str(', '.join(map(lambda x: x.book.title, person.books.all()))) + books = cut_str(', '.join(map(lambda x: x.book.title, person.books.all())), 70) print format % (name,p_id,books) def search_person(search_strings, search_description=False): @@ -81,7 +81,7 @@ commands = { 'show': 'search-person': { 'args': [('search_strings', (1,None))], 'options': [], - 'fun': search_person }, + 'fun': search_person_cmd }, 'commit': { 'args': [('filename', (0,1))], 'options': [],