def tail(text, places=50):
	"""
	Get the last part of a string, prepend '...' if it was truncated.
	"""
	if len(text) <= places:
		return text
	short = ' '.join(text[-places + 2:].split(' ')[1:])
	if len(short) < max(places * 0.8, places - 10):
		short = text[-places + 3:]
	return '...' + short