[enh] fix pep8, improve syntax highlighting

This commit is contained in:
Thomas Pointhuber 2014-12-22 16:26:45 +01:00
parent d810763107
commit af8dac93a8
3 changed files with 29 additions and 27 deletions

View file

@ -31,15 +31,18 @@ def request(query, params):
# get response from search-request
def response(resp):
results = []
search_results = loads(resp.text)
# parse results
for result in search_results['results']:
href = result['url']
title = "[" + result['type'] + "] " + result['namespace'] + " " + result['name']
content = '<span class="highlight">[' + result['type'] + "] " + result['name'] + " " + result['synopsis'] + "</span><br />" + result['description']
title = "[" + result['type'] + "] " +\
result['namespace'] + " " + result['name']
content = '<span class="highlight">[' + result['type'] + "] " +\
result['name'] + " " + result['synopsis'] +\
"</span><br />" + result['description']
# append result
results.append({'url': href,
'title': title,