Renamed function in ./util/text.py, adjusted some values for cutting off text.

This commit is contained in:
Luke Rogers 2012-10-13 11:49:42 +13:00
parent f799e477e3
commit 28345b9c56
4 changed files with 15 additions and 22 deletions

View file

@ -3,8 +3,7 @@ Scaevolus 2009'''
import re
from util import hook, http
from util.text import truncate_words
from util import hook, http, text
api_prefix = "http://en.wikipedia.org/w/api.php"
@ -45,6 +44,6 @@ def wiki(inp):
desc = re.sub('\s+', ' ', desc).strip() # remove excess spaces
desc = truncate_words(desc, 300)
desc = text.truncate_str(desc, 250)
return '%s -- %s' % (desc, http.quote(url, ':/'))