From bcf626d95fe5fdffaa9476952339d4cbdc881d8d Mon Sep 17 00:00:00 2001 From: ryanss Date: Fri, 16 Jan 2015 23:59:00 -0500 Subject: Wrap article url to 80 char width --- plugin/hackernews.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/hackernews.py b/plugin/hackernews.py index 357f6fd..ac680c0 100644 --- a/plugin/hackernews.py +++ b/plugin/hackernews.py @@ -41,7 +41,8 @@ def hacker_news_link(): b[0] = item['title'] b.append("Posted %s by %s" % (item['time_ago'], item['user'])) b.append("%d Points / %d Comments" % (item['points'], item['comments_count'])) - b.append("[%s]" % item['url']) + for i, wrap in enumerate(textwrap.wrap("[%s]" % item['url'], width=80)): + b.append(wrap) b.append("") b.append("") print_comments(item['comments'], b) -- cgit v1.2.3