From 1802359bbcb1a9a782b83032a277fd24d5487f36 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 20 Nov 2009 13:29:02 +0000 Subject: [PATCH] Now cuts the title down if it reaches over 107 characters --- output_twitter.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/output_twitter.py b/output_twitter.py index 10320a2..8411b78 100644 --- a/output_twitter.py +++ b/output_twitter.py @@ -66,11 +66,12 @@ class OutputTwitter: return # don't send empty twits for entry in feed.accepted: - content = "%s found and queued" % entry['title'] - if len(content) > 120: - return + if len(entry['title']) > 103: + content = "%s... found and queued" % entry['title'][:104] else: - api.PostUpdate(content) + content = "%s found and queued" % entry['title'] + log.debug("Sending Twitter: %s", content) + api.PostUpdate(content) try: import twitter