Now cuts the title down if it reaches over 107 characters

This commit is contained in:
2009-11-20 13:29:02 +00:00
parent cfb3a1e507
commit 1802359bbc

View File

@@ -66,11 +66,12 @@ class OutputTwitter:
return # don't send empty twits return # don't send empty twits
for entry in feed.accepted: for entry in feed.accepted:
content = "%s found and queued" % entry['title'] if len(entry['title']) > 103:
if len(content) > 120: content = "%s... found and queued" % entry['title'][:104]
return
else: else:
api.PostUpdate(content) content = "%s found and queued" % entry['title']
log.debug("Sending Twitter: %s", content)
api.PostUpdate(content)
try: try:
import twitter import twitter