add dealer name to title in brackets (#22)

This commit is contained in:
Dave Gallant
2019-09-15 00:26:16 -04:00
committed by GitHub
parent 62ab77ea3b
commit 57d3983bb4
3 changed files with 3 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
version = '0.1.9'
version = '0.2.0'

View File

@@ -117,6 +117,7 @@ def parse_threads(api_response, limit):
threads.append(
{
"title": topic.get("title"),
"dealer_name": topic["offer"].get("dealer_name"),
"score": calculate_score(topic),
"url": build_web_path(topic.get("web_path")),
}

View File

@@ -133,7 +133,7 @@ def threads(limit, forum_id):
+ "."
+ get_vote_color(thread.get("score"))
+ Fore.RESET
+ thread.get("title")
+ "[%s] %s" % (thread.get("dealer_name"), thread.get("title"))
)
click.echo(Fore.BLUE + " {}".format(thread.get("url")))
click.echo(Style.RESET_ALL)